summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-11-06 17:28:51 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-11-06 17:28:51 +0000
commit2d595d70202bad560c27ea81ec71b740415b3355 (patch)
treeb7ef86f564d21b94c4533a515fdfd66ea9566e34 /src
parent8d915cb6fbe2c2ed06f01d5f4838e1dd2fe406b4 (diff)
test ctx->RenderMode in chooser functions
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 49444020ee..b3c91048cc 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.27 2000/11/05 23:21:12 brianp Exp $ */
+/* $Id: osmesa.c,v 1.28 2000/11/06 17:28:51 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1417,8 +1417,9 @@ osmesa_choose_line_function( GLcontext *ctx )
OSMesaContext osmesa = (OSMesaContext) ctx;
SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ if (ctx->RenderMode != GL_RENDER) return NULL;
if (ctx->Line.SmoothFlag) return NULL;
- if (ctx->Texture._ReallyEnabled) return NULL;
+ if (ctx->Texture._ReallyEnabled) return NULL;
if (ctx->Light.ShadeModel!=GL_FLAT) return NULL;
if (ctx->Line.Width==1.0F
@@ -1606,9 +1607,10 @@ osmesa_choose_triangle_function( GLcontext *ctx )
if ((osmesa->format==OSMESA_RGB)||(osmesa->format==OSMESA_BGR))
return (swrast_tri_func)NULL;
- if (ctx->Polygon.SmoothFlag) return (swrast_tri_func)NULL;
- if (ctx->Polygon.StippleFlag) return (swrast_tri_func)NULL;
- if (ctx->Texture._ReallyEnabled) return (swrast_tri_func)NULL;
+ if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL;
+ if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL;
+ if (ctx->Polygon.StippleFlag) return (swrast_tri_func) NULL;
+ if (ctx->Texture._ReallyEnabled) return (swrast_tri_func) NULL;
if (swrast->_RasterMask==DEPTH_BIT
&& ctx->Depth.Func==GL_LESS
@@ -1648,10 +1650,19 @@ static void osmesa_choose_line( GLcontext *ctx )
}
-#define OSMESA_NEW_LINE (_NEW_LINE|_NEW_TEXTURE|_NEW_LIGHT|\
- _NEW_DEPTH|_SWRAST_NEW_RASTERMASK)
-#define OSMESA_NEW_TRIANGLE (_NEW_POLYGON|_NEW_TEXTURE|_NEW_LIGHT|\
- _SWRAST_NEW_RASTERMASK|_NEW_DEPTH)
+#define OSMESA_NEW_LINE (_NEW_LINE | \
+ _NEW_TEXTURE | \
+ _NEW_LIGHT | \
+ _NEW_DEPTH | \
+ _NEW_RENDERMODE | \
+ _SWRAST_NEW_RASTERMASK)
+
+#define OSMESA_NEW_TRIANGLE (_NEW_POLYGON | \
+ _NEW_TEXTURE | \
+ _NEW_LIGHT | \
+ _NEW_DEPTH | \
+ _NEW_RENDERMODE | \
+ _SWRAST_NEW_RASTERMASK)
/* Extend the software rasterizer with our line and triangle