* change, flushes the vertices and notifies the driver via
* the dd_function_table::CullFace callback.
*/
-void GLAPIENTRY
-_mesa_CullFace( GLenum mode )
+static void
+cull_face(struct gl_context *ctx, GLenum mode)
{
- GET_CURRENT_CONTEXT(ctx);
-
- if (MESA_VERBOSE&VERBOSE_API)
- _mesa_debug(ctx, "glCullFace %s\n", _mesa_enum_to_string(mode));
-
- if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) {
- _mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" );
- return;
- }
-
if (ctx->Polygon.CullFaceMode == mode)
return;
ctx->Polygon.CullFaceMode = mode;
if (ctx->Driver.CullFace)
- ctx->Driver.CullFace( ctx, mode );
+ ctx->Driver.CullFace(ctx, mode);
+}
+
+
+void GLAPIENTRY
+_mesa_CullFace(GLenum mode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glCullFace %s\n", _mesa_enum_to_string(mode));
+
+ if (mode != GL_FRONT && mode != GL_BACK && mode != GL_FRONT_AND_BACK) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glCullFace");
+ return;
+ }
+
+ cull_face(ctx, mode);
}
_mesa_GetnPolygonStippleARB( GLsizei bufSize, GLubyte *dest );
extern void GLAPIENTRY
-_mesa_CullFace( GLenum mode );
+_mesa_CullFace(GLenum mode);
extern void GLAPIENTRY
_mesa_FrontFace( GLenum mode );