summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_bitmap.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2000-11-05 18:24:40 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2000-11-05 18:24:40 +0000
commitcd03ed4f54444d96e4e47cdb118a3dfd94d92bb0 (patch)
tree57d9620635286b4ee4b8adf950014113d5961017 /src/mesa/swrast/s_bitmap.c
parent7c20642b1091df1aab7d9076a3fe2fb11c6f011c (diff)
Reorganized software rasterizer as a module which manages its own state,
with tighter interfaces with the rest of the world. Proper documentation to come.
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 */