From Paul Martz, "Summary: GL3 deprecates "glGetString(GL_EXTENSIONS)". In GL3, individual extension strings are queried by looping over GL_NUM_EXTENSIONS and calling "glGetStringi(GL_EXTENSIONS,<index>)".
The fix is basically as follows: if( GL3 ) Query indexed extension strings. else Query the old way. The "else" branch is re-indented but otherwise shouldn't contain any changes." From Robert Osfield, added #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) to new block to prevent it being compiled under GLES where no glGetStringi exists.
This commit is contained in:
parent
0e29cd6971
commit
75527fd800
@ -91,6 +91,7 @@ bool osg::isGLExtensionOrVersionSupported(unsigned int contextID, const char *ex
|
||||
rendererString = renderer ? (const char*)renderer : "";
|
||||
|
||||
// get the extension list from OpenGL.
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
if( osg::getGLVersionNumber() >= 3.0 )
|
||||
{
|
||||
// OpenGL 3.0 adds the concept of indexed strings and
|
||||
@ -122,6 +123,7 @@ bool osg::isGLExtensionOrVersionSupported(unsigned int contextID, const char *ex
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// Get extensions using GL1/2 interface.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user