PDGL_API void pdglFrontFace(int mode) { if(pglFrontFace) { pglFrontFace(mode); return; } pglFrontFace=pdglGetProcAddress("glFrontFace"); pglFrontFace(mode); }
// set front face static void ogl_FrontFace( GfxFace eFace) { // check consistency and face ASSERT( eFace==GFX_CW || eFace==GFX_CCW); ASSERT( _pGfx->gl_eCurrentAPI==GAT_OGL); #ifndef NDEBUG GLenum gleFace; pglGetIntegerv( GL_FRONT_FACE, (GLint*)&gleFace); OGL_CHECKERROR; ASSERT( (gleFace==GL_CCW && GFX_bFrontFace) || (gleFace==GL_CW && !GFX_bFrontFace)); #endif // cached? BOOL bFrontFace = (eFace==GFX_CCW); if( !bFrontFace==!GFX_bFrontFace && gap_bOptimizeStateChanges) return; _sfStats.StartTimer(CStatForm::STI_GFXAPI); if( eFace==GFX_CCW) { pglFrontFace( GL_CCW); } else { pglFrontFace( GL_CW); } OGL_CHECKERROR; GFX_bFrontFace = bFrontFace; _sfStats.StopTimer(CStatForm::STI_GFXAPI); }
/* ================= GL_FrontFace ================= */ void GL_FrontFace( GLenum front ) { pglFrontFace( front ? GL_CW : GL_CCW ); glState.frontFace = front; }