summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_bitmap.c')
-rw-r--r--src/mesa/swrast/s_bitmap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 646081b83e..f11186baed 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -1,4 +1,4 @@
-/* $Id: s_bitmap.c,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_bitmap.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -30,6 +30,7 @@
#include "macros.h"
#include "pixel.h"
+#include "s_context.h"
#include "s_fog.h"
#include "s_pb.h"
@@ -44,7 +45,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
{
- struct pixel_buffer *PB = ctx->PB;
+ struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB;
GLint row, col;
GLdepth fragZ;
GLfixed fogCoord;
@@ -52,9 +53,12 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
ASSERT(ctx->RenderMode == GL_RENDER);
ASSERT(bitmap);
- if (ctx->PB->primitive != GL_BITMAP) {
+ if (SWRAST_CONTEXT(ctx)->NewState)
+ _swrast_validate_derived( ctx );
+
+ if (PB->primitive != GL_BITMAP) {
gl_flush_pb( ctx );
- ctx->PB->primitive = GL_BITMAP;
+ PB->primitive = GL_BITMAP;
}
/* Set bitmap drawing color */