Got it working... well, sort of.
The issue seems to be with gles2w, the library for extension function retrieval used by Ogre. I built a minimal gles2 program with that library (not using Ogre) and got the same crash. Not sure what is going on, the function pointers seem to be retrieved correctly. I don't get the crash when not using gles2w.
I also noticed that the GL headers found in RenderSystems/GLES2/include/GLES2 don't match the headers I have in my system. Updating them reveals one compilation error with gles2w.cpp (a missing const in a function prototype). Fixing that error and using the updated headers didn't fix the Ogre crash though.
As for the "fix" I ripped out gles2w and stubbed all the now not-found extension functions... patch for 1.10 (warning: gross):
Code: Select all
diff -r da72caddf49f RenderSystems/GLES2/include/OgreGLES2Prerequisites.h
--- a/RenderSystems/GLES2/include/OgreGLES2Prerequisites.h Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/include/OgreGLES2Prerequisites.h Fri Feb 13 10:43:38 2015 +0100
@@ -37,11 +37,14 @@
# define GL_GLEXT_PROTOTYPES
#endif
+
+/*
#if OGRE_NO_GLES3_SUPPORT == 0 && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
# include <GLES3/gles3w.h>
#else
# include <GLES2/gles2w.h>
#endif
+*/
#if (OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS)
# ifdef __OBJC__
@@ -92,7 +95,6 @@
# endif
# endif
# endif
-# undef GL_GLEXT_PROTOTYPES
# if OGRE_NO_GLES3_SUPPORT == 0
# include <GLES3/gl3platform.h>
# include <GLES3/gl3.h>
diff -r da72caddf49f RenderSystems/GLES2/src/EGL/OgreEGLContext.cpp
--- a/RenderSystems/GLES2/src/EGL/OgreEGLContext.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/EGL/OgreEGLContext.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -79,10 +79,6 @@
}
setCurrent();
-
- // Initialise GL3W
- if (gleswInit())
- LogManager::getSingleton().logMessage("Failed to initialize GL3W");
}
void EGLContext::_destroyInternalResources()
diff -r da72caddf49f RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESLinkProgram.cpp
--- a/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESLinkProgram.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESLinkProgram.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -208,7 +208,7 @@
// Get buffer size
GLint binaryLength = 0;
- if(getGLES2SupportRef()->checkExtension("GL_OES_get_program_binary") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_OES_get_program_binary") || false)
OGRE_CHECK_GL_ERROR(glGetProgramiv(mGLProgramHandle, GL_PROGRAM_BINARY_LENGTH_OES, &binaryLength));
// Create microcode
@@ -216,7 +216,7 @@
GpuProgramManager::getSingleton().createMicrocode(static_cast<uint32>(binaryLength + sizeof(GLenum)));
// Get binary
- if(getGLES2SupportRef()->checkExtension("GL_OES_get_program_binary") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_OES_get_program_binary") || false)
OGRE_CHECK_GL_ERROR(glGetProgramBinaryOES(mGLProgramHandle, binaryLength, NULL, (GLenum *)newMicrocode->getPtr(),
newMicrocode->getPtr() + sizeof(GLenum)));
diff -r da72caddf49f RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgram.cpp
--- a/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgram.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgram.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -196,8 +196,6 @@
#if OGRE_PLATFORM != OGRE_PLATFORM_NACL
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- glLabelObjectEXT(GL_SHADER_OBJECT_EXT, mGLShaderHandle, 0, mName.c_str());
}
#endif
@@ -207,8 +205,6 @@
#if OGRE_PLATFORM != OGRE_PLATFORM_NACL
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- glLabelObjectEXT(GL_PROGRAM_OBJECT_EXT, mGLProgramHandle, 0, mName.c_str());
}
#endif
}
diff -r da72caddf49f RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramCommon.cpp
--- a/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramCommon.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramCommon.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -181,7 +181,7 @@
// get size of binary
cacheMicrocode->read(&binaryFormat, sizeof(GLenum));
- if(getGLES2SupportRef()->checkExtension("GL_OES_get_program_binary") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_OES_get_program_binary") || false)
{
GLint binaryLength = static_cast<GLint>(cacheMicrocode->size() - sizeof(GLenum));
diff -r da72caddf49f RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramPipeline.cpp
--- a/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramPipeline.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramPipeline.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -137,10 +137,6 @@
// Validate pipeline
logObjectInfo( getCombinedName() + String("GLSL program pipeline result : "), mGLProgramPipelineHandle );
#if OGRE_PLATFORM != OGRE_PLATFORM_NACL
- if(mVertexProgram && mFragmentProgram)
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- glLabelObjectEXT(GL_PROGRAM_PIPELINE_OBJECT_EXT, mGLProgramPipelineHandle, 0,
- (mVertexProgram->getName() + "/" + mFragmentProgram->getName()).c_str());
#endif
}
#endif
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2DefaultHardwareBufferManager.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2DefaultHardwareBufferManager.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2DefaultHardwareBufferManager.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -250,7 +250,7 @@
GLES2DefaultHardwareBufferManagerBase::createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage,
bool useShadowBuffer, const String& name)
{
- if(!gleswIsSupported(3, 0))
+ if(!false)
{
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"GLES2 does not support uniform buffer objects",
@@ -262,7 +262,7 @@
Ogre::RenderToVertexBufferSharedPtr GLES2DefaultHardwareBufferManagerBase::createRenderToVertexBuffer( void )
{
- if(!gleswIsSupported(3, 0))
+ if(!false)
{
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Cannot create RenderToVertexBuffer in GLES2DefaultHardwareBufferManagerBase",
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2FBORenderTexture.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2FBORenderTexture.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2FBORenderTexture.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -464,7 +464,7 @@
desirability += 2000;
if(depthBits[props.modes[mode].depth]==24) // Prefer 24 bit for now
desirability += 500;
- if (getGLES2SupportRef()->checkExtension("GL_OES_packed_depth_stencil") || gleswIsSupported(3, 0))
+ if (getGLES2SupportRef()->checkExtension("GL_OES_packed_depth_stencil") || false)
if(depthFormats[props.modes[mode].depth] == GL_DEPTH24_STENCIL8_OES) // Prefer 24/8 packed
desirability += 5000;
#if OGRE_NO_GLES3_SUPPORT == 0
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2FrameBufferObject.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2FrameBufferObject.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2FrameBufferObject.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -45,15 +45,13 @@
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mFB, 0, ("FBO #" + StringConverter::toString(mFB)).c_str()));
}
mNumSamples = 0;
mMultisampleFB = 0;
// Check multisampling if supported
- if(gleswIsSupported(3, 0))
+ if(false)
{
// Check samples supported
OGRE_CHECK_GL_ERROR(glBindFramebuffer(GL_FRAMEBUFFER, mFB));
@@ -69,8 +67,6 @@
OGRE_CHECK_GL_ERROR(glGenFramebuffers(1, &mMultisampleFB));
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mMultisampleFB, 0, ("MSAA FBO #" + StringConverter::toString(mMultisampleFB)).c_str()));
}
}
else
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2HardwareBufferManager.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2HardwareBufferManager.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2HardwareBufferManager.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -58,7 +58,7 @@
{
GLES2HardwareVertexBuffer* buf = 0;
- if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || false)
buf = OGRE_NEW GLES2HardwareVertexBuffer(this, vertexSize, numVerts, usage, useShadowBuffer);
else
// always use shadowBuffer
@@ -77,7 +77,7 @@
bool useShadowBuffer)
{
GLES2HardwareIndexBuffer* buf = 0;
- if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || false)
buf = OGRE_NEW GLES2HardwareIndexBuffer(this, itype, numIndexes, usage, useShadowBuffer);
else
// always use shadowBuffer
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2HardwareIndexBuffer.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2HardwareIndexBuffer.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2HardwareIndexBuffer.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -64,8 +64,6 @@
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mBufferId, 0, ("Index Buffer #" + StringConverter::toString(mBufferId)).c_str()));
}
if (!mBufferId)
@@ -194,7 +192,7 @@
}
else
{
- if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || false)
{
// Map the buffer range then copy out of it into our destination buffer
void* srcData;
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2HardwareOcclusionQuery.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2HardwareOcclusionQuery.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2HardwareOcclusionQuery.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -57,7 +57,7 @@
{
// Check for hardware occlusion support
- if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
OGRE_CHECK_GL_ERROR(glGenQueriesEXT(1, &mQueryID));
}
@@ -72,7 +72,7 @@
//------------------------------------------------------------------
void GLES2HardwareOcclusionQuery::destroyQuery()
{
- if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
OGRE_CHECK_GL_ERROR(glDeleteQueriesEXT(1, &mQueryID));
}
@@ -92,7 +92,7 @@
//------------------------------------------------------------------
void GLES2HardwareOcclusionQuery::beginOcclusionQuery()
{
- if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
OGRE_CHECK_GL_ERROR(glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, mQueryID));
}
@@ -100,7 +100,7 @@
//------------------------------------------------------------------
void GLES2HardwareOcclusionQuery::endOcclusionQuery()
{
- if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
OGRE_CHECK_GL_ERROR(glEndQueryEXT(GL_ANY_SAMPLES_PASSED_EXT));
}
@@ -108,7 +108,7 @@
//------------------------------------------------------------------
bool GLES2HardwareOcclusionQuery::pullOcclusionQuery( unsigned int* NumOfFragments )
{
- if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
OGRE_CHECK_GL_ERROR(glGetQueryObjectuivEXT(mQueryID, GL_QUERY_RESULT_EXT, (GLuint*)NumOfFragments));
mPixelCount = *NumOfFragments;
@@ -122,7 +122,7 @@
{
GLuint available = GL_FALSE;
- if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
OGRE_CHECK_GL_ERROR(glGetQueryObjectuivEXT(mQueryID, GL_QUERY_RESULT_AVAILABLE_EXT, &available));
}
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2HardwarePixelBuffer.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2HardwarePixelBuffer.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2HardwarePixelBuffer.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -333,7 +333,6 @@
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mBufferId, 0, ("Pixel Buffer #" + StringConverter::toString(mBufferId)).c_str()));
}
// Upload data to PBO
@@ -486,7 +485,6 @@
OGRE_CHECK_GL_ERROR(glGenBuffers(1, &mBufferId));
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mBufferId, 0, ("Pixel Buffer #" + StringConverter::toString(mBufferId)).c_str()));
}
OGRE_CHECK_GL_ERROR(glBindBuffer(GL_PIXEL_PACK_BUFFER, mBufferId));
@@ -858,7 +856,7 @@
OGRE_CHECK_GL_ERROR(glGenTextures(1, &tempTex));
getGLES2SupportRef()->getStateCacheManager()->bindGLTexture(GL_TEXTURE_2D, tempTex);
- if(getGLES2SupportRef()->checkExtension("GL_APPLE_texture_max_level") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_APPLE_texture_max_level") || false)
getGLES2SupportRef()->getStateCacheManager()->setTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL_APPLE, 0);
// Allocate temporary texture of the size of the destination area
@@ -1056,7 +1054,7 @@
// Set texture type
getGLES2SupportRef()->getStateCacheManager()->bindGLTexture(target, id);
- if(getGLES2SupportRef()->checkExtension("GL_APPLE_texture_max_level") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_APPLE_texture_max_level") || false)
getGLES2SupportRef()->getStateCacheManager()->setTexParameteri(target, GL_TEXTURE_MAX_LEVEL_APPLE, 1000);
// Allocate texture memory
@@ -1231,8 +1229,6 @@
OGRE_CHECK_GL_ERROR(glGenRenderbuffers(1, &mRenderbufferID));
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mRenderbufferID, 0, ("RB " + StringConverter::toString(mRenderbufferID) + " MSAA: " + StringConverter::toString(mNumSamples)).c_str()));
}
// Bind it to FBO
@@ -1241,7 +1237,7 @@
// Allocate storage for depth buffer
if (mNumSamples > 0)
{
- if(getGLES2SupportRef()->checkExtension("GL_APPLE_framebuffer_multisample") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_APPLE_framebuffer_multisample") || false)
{
OGRE_CHECK_GL_ERROR(glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER,
mNumSamples, mGLInternalFormat, mWidth, mHeight));
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2HardwareUniformBuffer.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2HardwareUniformBuffer.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2HardwareUniformBuffer.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -45,8 +45,6 @@
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mBufferId, 0, ("Uniform Buffer #" + StringConverter::toString(mBufferId)).c_str()));
}
if (!mBufferId)
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2HardwareVertexBuffer.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2HardwareVertexBuffer.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2HardwareVertexBuffer.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -54,8 +54,6 @@
OGRE_CHECK_GL_ERROR(glGenBuffers(1, &mBufferId));
if(getGLES2SupportRef()->checkExtension("GL_EXT_debug_label"))
{
- OGRE_IF_IOS_VERSION_IS_GREATER_THAN(5.0)
- OGRE_CHECK_GL_ERROR(glLabelObjectEXT(GL_BUFFER_OBJECT_EXT, mBufferId, 0, ("Vertex Buffer #" + StringConverter::toString(mBufferId)).c_str()));
}
if (!mBufferId)
@@ -184,7 +182,7 @@
}
else
{
- if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_EXT_map_buffer_range") || false)
{
// Map the buffer range then copy out of it into our destination buffer
void* srcData;
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -250,7 +250,7 @@
rsc->setCapability(RSC_32BIT_INDEX);
// Check for hardware occlusion support
- if(mGLSupport->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
rsc->setCapability(RSC_HWOCCLUSION);
}
@@ -285,7 +285,7 @@
mGLSupport->checkExtension("WEBGL_compressed_texture_etc1"))
rsc->setCapability(RSC_TEXTURE_COMPRESSION_ETC1);
- if(gleswIsSupported(3, 0))
+ if(false)
rsc->setCapability(RSC_TEXTURE_COMPRESSION_ETC2);
if(mGLSupport->checkExtension("GL_AMD_compressed_ATC_texture") ||
@@ -400,7 +400,7 @@
rsc->setFragmentProgramConstantIntCount((Ogre::ushort)floatConstantCount);
// Check for Float textures
- if(mGLSupport->checkExtension("GL_OES_texture_float") || mGLSupport->checkExtension("GL_OES_texture_half_float") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_OES_texture_float") || mGLSupport->checkExtension("GL_OES_texture_half_float") || false)
rsc->setCapability(RSC_TEXTURE_FLOAT);
rsc->setCapability(RSC_TEXTURE_1D);
@@ -410,7 +410,7 @@
// ES 3 always supports NPOT textures
#if OGRE_PLATFORM != OGRE_PLATFORM_ANDROID && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
- if(mGLSupport->checkExtension("GL_OES_texture_npot") || mGLSupport->checkExtension("GL_ARB_texture_non_power_of_two") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_OES_texture_npot") || mGLSupport->checkExtension("GL_ARB_texture_non_power_of_two") || false)
{
rsc->setCapability(RSC_NON_POWER_OF_2_TEXTURES);
rsc->setNonPOW2TexturesLimited(false);
@@ -430,15 +430,15 @@
#if OGRE_NO_GLES2_VAO_SUPPORT == 0
# if OGRE_PLATFORM == OGRE_PLATFORM_EMSCRIPTEN
- if(mGLSupport->checkExtension("GL_OES_vertex_array_object") || gleswIsSupported(3, 0) || emscripten_get_compiler_setting("LEGACY_GL_EMULATION"))
+ if(mGLSupport->checkExtension("GL_OES_vertex_array_object") || false || emscripten_get_compiler_setting("LEGACY_GL_EMULATION"))
# else
- if(mGLSupport->checkExtension("GL_OES_vertex_array_object") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_OES_vertex_array_object") || false)
# endif
rsc->setCapability(RSC_VAO);
#endif
#if OGRE_NO_GLES3_SUPPORT == 0
- if (mGLSupport->checkExtension("GL_OES_get_program_binary") || gleswIsSupported(3, 0))
+ if (mGLSupport->checkExtension("GL_OES_get_program_binary") || false)
{
// http://www.khronos.org/registry/gles/extensions/OES/OES_get_program_binary.txt
GLint formats;
@@ -449,7 +449,7 @@
}
#endif
- if (mGLSupport->checkExtension("GL_EXT_instanced_arrays") || gleswIsSupported(3, 0))
+ if (mGLSupport->checkExtension("GL_EXT_instanced_arrays") || false)
{
rsc->setCapability(RSC_VERTEX_BUFFER_INSTANCE_DATA);
}
@@ -944,11 +944,11 @@
func = GL_FUNC_REVERSE_SUBTRACT;
break;
case SBO_MIN:
- if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || false)
func = GL_MIN_EXT;
break;
case SBO_MAX:
- if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || false)
func = GL_MAX_EXT;
break;
}
@@ -991,11 +991,11 @@
func = GL_FUNC_REVERSE_SUBTRACT;
break;
case SBO_MIN:
- if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || false)
func = GL_MIN_EXT;
break;
case SBO_MAX:
- if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || false)
func = GL_MAX_EXT;
break;
}
@@ -1012,11 +1012,11 @@
alphaFunc = GL_FUNC_REVERSE_SUBTRACT;
break;
case SBO_MIN:
- if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || false)
alphaFunc = GL_MIN_EXT;
break;
case SBO_MAX:
- if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_blend_minmax") || false)
alphaFunc = GL_MAX_EXT;
break;
}
@@ -1365,7 +1365,7 @@
//---------------------------------------------------------------------
HardwareOcclusionQuery* GLES2RenderSystem::createHardwareOcclusionQuery(void)
{
- if(mGLSupport->checkExtension("GL_EXT_occlusion_query_boolean") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_occlusion_query_boolean") || false)
{
GLES2HardwareOcclusionQuery* ret = new GLES2HardwareOcclusionQuery();
mHwOcclusionQueries.push_back(ret);
@@ -1632,7 +1632,7 @@
VertexDeclaration* globalVertexDeclaration = 0;
bool hasInstanceData = false;
size_t numberOfInstances = 0;
- if(mGLSupport->checkExtension("GL_EXT_instanced_arrays") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_instanced_arrays") || false)
{
globalInstanceVertexBuffer = getGlobalInstanceVertexBuffer();
globalVertexDeclaration = getGlobalInstanceVertexBufferVertexDeclaration();
@@ -1681,7 +1681,7 @@
mRenderAttribsBound, mRenderInstanceAttribsBound, true);
}
- if(mGLSupport->checkExtension("GL_EXT_instanced_arrays") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_instanced_arrays") || false)
{
if( !globalInstanceVertexBuffer.isNull() && globalVertexDeclaration != NULL )
{
@@ -1744,9 +1744,8 @@
mDerivedDepthBiasSlopeScale);
}
- if(hasInstanceData && (mGLSupport->checkExtension("GL_EXT_instanced_arrays") || gleswIsSupported(3, 0)))
+ if(hasInstanceData && (mGLSupport->checkExtension("GL_EXT_instanced_arrays") || false))
{
- OGRE_CHECK_GL_ERROR(glDrawElementsInstancedEXT((polyMode == GL_FILL) ? primType : polyMode, static_cast<GLsizei>(op.indexData->indexCount), indexType, pBufferData, static_cast<GLsizei>(numberOfInstances)));
}
else
{
@@ -1772,9 +1771,8 @@
mDerivedDepthBiasSlopeScale);
}
- if((mGLSupport->checkExtension("GL_EXT_instanced_arrays") || gleswIsSupported(3, 0)) && hasInstanceData)
+ if((mGLSupport->checkExtension("GL_EXT_instanced_arrays") || false) && hasInstanceData)
{
- OGRE_CHECK_GL_ERROR(glDrawArraysInstancedEXT((polyMode == GL_FILL) ? primType : polyMode, 0, static_cast<GLsizei>(op.vertexData->vertexCount), static_cast<GLsizei>(numberOfInstances)));
}
else
{
@@ -1789,7 +1787,7 @@
}
#if OGRE_NO_GLES2_VAO_SUPPORT == 0
- if(mGLSupport->checkExtension("GL_OES_vertex_array_object") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_OES_vertex_array_object") || false)
// Unbind the vertex array object. Marks the end of what state will be included.
OGRE_CHECK_GL_ERROR(glBindVertexArrayOES(0));
#endif
@@ -1804,7 +1802,6 @@
// Unbind any instance attributes
for (vector<GLuint>::type::iterator ai = mRenderInstanceAttribsBound.begin(); ai != mRenderInstanceAttribsBound.end(); ++ai)
{
- glVertexAttribDivisorEXT(*ai, 0);
}
mRenderAttribsBound.clear();
@@ -2412,14 +2409,12 @@
attrib = (GLuint)linkProgram->getAttributeIndex(sem, elemIndex);
}
- if(mGLSupport->checkExtension("GL_EXT_instanced_arrays") || gleswIsSupported(3, 0))
+ if(mGLSupport->checkExtension("GL_EXT_instanced_arrays") || false)
{
if (mCurrentVertexProgram)
{
if (hwGlBuffer->getIsInstanceData())
{
- OGRE_CHECK_GL_ERROR(glVertexAttribDivisorEXT(attrib, static_cast<GLuint>(hwGlBuffer->getInstanceDataStepRate())));
- instanceAttribsBound.push_back(attrib);
}
}
}
diff -r da72caddf49f RenderSystems/GLES2/src/OgreGLES2Texture.cpp
--- a/RenderSystems/GLES2/src/OgreGLES2Texture.cpp Fri Feb 13 06:17:57 2015 +0100
+++ b/RenderSystems/GLES2/src/OgreGLES2Texture.cpp Fri Feb 13 10:43:38 2015 +0100
@@ -148,7 +148,7 @@
if((mUsage & TU_AUTOMIPMAP) && mMipmapsHardwareGenerated && mNumRequestedMipmaps)
mNumMipmaps = maxMips;
- if(getGLES2SupportRef()->checkExtension("GL_APPLE_texture_max_level") || gleswIsSupported(3, 0))
+ if(getGLES2SupportRef()->checkExtension("GL_APPLE_texture_max_level") || false)
mGLSupport.getStateCacheManager()->setTexParameteri(texTarget, GL_TEXTURE_MAX_LEVEL_APPLE, mNumRequestedMipmaps ? mNumMipmaps + 1 : 0);
// Set some misc default parameters, these can of course be changed later
@@ -163,7 +163,7 @@
// Set up texture swizzling
#if OGRE_NO_GLES3_SUPPORT == 0
- if(gleswIsSupported(3, 0))
+ if(false)
{
OGRE_CHECK_GL_ERROR(glTexParameteri(texTarget, GL_TEXTURE_SWIZZLE_R, GL_RED));
OGRE_CHECK_GL_ERROR(glTexParameteri(texTarget, GL_TEXTURE_SWIZZLE_G, GL_GREEN));