static int statObj=0;
static SGShadowVolume *states;
-static glBlendEquationProc glBlendEquation = NULL;
+static glBlendEquationProc glBlendEquationPtr = NULL;
#define GL_MIN_EXT 0x8007
#define GL_MAX_EXT 0x8008
{
//Increment stencil buffer for front face depth pass
if( states->use_alpha ) {
- glBlendEquation( GL_FUNC_ADD );
+ glBlendEquationPtr( GL_FUNC_ADD );
glBlendFunc( GL_ONE, GL_ONE );
glColor4ub(1, 1, 1, 16);
} else {
//Decrement stencil buffer for back face depth pass
if( states->use_alpha ) {
- glBlendEquation( GL_FUNC_REVERSE_SUBTRACT );
+ glBlendEquationPtr( GL_FUNC_REVERSE_SUBTRACT );
glBlendFunc( GL_ONE, GL_ONE );
glColor4ub(1, 1, 1, 16);
} else {
// => that still does not work with our geometry so use subtractive blend
// clamp mask = {0,16,32,64,...} => {0,16,16,16,...}
- glBlendEquation( GL_MIN_EXT );
+ glBlendEquationPtr( GL_MIN_EXT );
glBlendFunc( GL_DST_COLOR, GL_ONE );
glColor4ub(1, 1, 1, 16);
glRectf(-100,-100,100,100);
// scale mask = {0,16} => {0,64}
- glBlendEquation( GL_FUNC_ADD );
+ glBlendEquationPtr( GL_FUNC_ADD );
glBlendFunc( GL_DST_COLOR, GL_ONE );
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glRectf(-100,-100,100,100);
SceneryObject_map::iterator iSceneryObject;
for(iSceneryObject = sceneryObjects.begin() ; iSceneryObject != sceneryObjects.end(); ) {
delete iSceneryObject->second;
- iSceneryObject = sceneryObjects.erase( iSceneryObject );
+ sceneryObjects.erase( iSceneryObject );
}
}
bool hasSubtractiveBlend = SGIsOpenGLExtensionSupported("GL_EXT_blend_subtract");
bool hasMinMaxBlend = SGIsOpenGLExtensionSupported("GL_EXT_blend_minmax");
if( hasSubtractiveBlend )
- glBlendEquation = (glBlendEquationProc ) SGLookupFunction("glBlendEquationEXT");
+ glBlendEquationPtr = (glBlendEquationProc ) SGLookupFunction("glBlendEquationEXT");
canDoAlpha = (alphaBits >= 8) && hasSubtractiveBlend && hasMinMaxBlend;
canDoStencil = (stencilBits >= 3);
if( !canDoStencil )
for(iSceneryObject = sceneryObjects.begin() ; iSceneryObject != sceneryObjects.end(); ) {
if( iSceneryObject->second->tile == tile ) {
delete iSceneryObject->second;
- iSceneryObject = sceneryObjects.erase( iSceneryObject );
+ sceneryObjects.erase( iSceneryObject );
}
else
iSceneryObject++;