Introduced the usage of GL_MAX_TEXTURE_IMAGE_UNITS where support in place of the check of GL_MAX_TEXTURE_UNITS.
This commit is contained in:
parent
8b141567b9
commit
d508934961
@ -2421,7 +2421,7 @@ void Texture::Extensions::setupGLExtensions(unsigned int contextID)
|
|||||||
|
|
||||||
bool builtInSupport = OSG_GLES2_FEATURES || OSG_GL3_FEATURES;
|
bool builtInSupport = OSG_GLES2_FEATURES || OSG_GL3_FEATURES;
|
||||||
|
|
||||||
_isMultiTexturingSupported = builtInSupport ||
|
_isMultiTexturingSupported = builtInSupport || OSG_GLES1_FEATURES ||
|
||||||
isGLExtensionOrVersionSupported( contextID,"GL_ARB_multitexture", 1.3f) ||
|
isGLExtensionOrVersionSupported( contextID,"GL_ARB_multitexture", 1.3f) ||
|
||||||
isGLExtensionOrVersionSupported(contextID,"GL_EXT_multitexture", 1.3f);
|
isGLExtensionOrVersionSupported(contextID,"GL_EXT_multitexture", 1.3f);
|
||||||
|
|
||||||
@ -2484,9 +2484,20 @@ void Texture::Extensions::setupGLExtensions(unsigned int contextID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( _isMultiTexturingSupported )
|
if( _isMultiTexturingSupported )
|
||||||
|
{
|
||||||
|
#if defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE)
|
||||||
|
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,&_numTextureUnits);
|
||||||
|
#else
|
||||||
|
if (osg::asciiToFloat(version)>=2.0)
|
||||||
|
{
|
||||||
|
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,&_numTextureUnits);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS,&_numTextureUnits);
|
glGetIntegerv(GL_MAX_TEXTURE_UNITS,&_numTextureUnits);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_numTextureUnits = 1;
|
_numTextureUnits = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user