diff options
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index d7e7293b218..ca5ff944844 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -56,7 +56,7 @@ #include "fxdrv.h" #include "enums.h" #include "extensions.h" - +#include "pb.h" /* These lookup table are used to extract RGB values in [0,255] from * 16-bit pixel values. @@ -847,6 +847,16 @@ static void fxDDUpdateDDPointers(GLcontext *ctx) } } +static void fxDDReducedPrimitiveChange(GLcontext *ctx, GLenum prim) +{ + if (ctx->Polygon.CullFlag) { + if (ctx->PB->primitive != GL_POLYGON) { /* Lines or Points */ + FX_grCullMode(GR_CULL_DISABLE); + FX_CONTEXT(ctx)->cullMode=GR_CULL_DISABLE; + } + } +} + void fxSetupDDPointers(GLcontext *ctx) { if (MESA_VERBOSE&VERBOSE_DRIVER) { @@ -910,6 +920,7 @@ void fxSetupDDPointers(GLcontext *ctx) ctx->Driver.CullFace=fxDDCullFace; ctx->Driver.ShadeModel=fxDDShadeModel; ctx->Driver.Enable=fxDDEnable; + ctx->Driver.ReducedPrimitiveChange=fxDDReducedPrimitiveChange; ctx->Driver.RegisterVB=fxDDRegisterVB; ctx->Driver.UnregisterVB=fxDDUnregisterVB; |