Add support for GL_ATI_separate_stencil

glStencilOpSeparateATI() should behave exactly the same as
glStencilOpSeparate() so supporting it is easy enough and might help
some people with hardware or drivers that don't support OpenGL 2.0,
like the Mac OSX versions for PPC.
This commit is contained in:
Daniel Gibson 2021-10-12 19:32:32 +02:00
parent 4f0c54f63f
commit ad327d34d1

View file

@ -401,9 +401,13 @@ static void R_CheckPortableExtensions( void ) {
if( glConfig.glVersion >= 2.0) {
common->Printf( "... got GL2.0+ glStencilOpSeparate()\n" );
qglStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)GLimp_ExtensionPointer( "glStencilOpSeparate" );
} else if( R_CheckExtension( "GL_ATI_separate_stencil" ) ) {
common->Printf( "... got glStencilOpSeparateATI() (GL_ATI_separate_stencil)\n" );
// the ATI version of glStencilOpSeparate() has the same signature and should also
// behave identical to the GL2 version (in Mesa3D it's just an alias)
qglStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)GLimp_ExtensionPointer( "glStencilOpSeparateATI" );
} else {
// TODO: there was an extension by ATI providing glStencilOpSeparateATI - do we care?
common->Printf( "... don't have GL2.0+ glStencilOpSeparate()\n" );
common->Printf( "... don't have glStencilOpSeparateATI() or (GL2.0+) glStencilOpSeparate()\n" );
qglStencilOpSeparate = NULL;
}