SampleBrowser segfaults with GLES2

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
ayberkozgur
Gnoblar
Posts: 3
Joined: Wed Sep 17, 2014 5:29 pm
Location: Lausanne, Switzerland
x 2

SampleBrowser segfaults with GLES2

Post by ayberkozgur »

My SampleBrowser build (default settings with just GLES2 turned on) segfaults with no useful info.

I'm on Kubuntu 14.04, Ogre 1.9 with Intel HD 4000.

es2_info reports:

Code: Select all

libEGL warning: failed to create a pipe screen for i965
EGL_VERSION: 1.4 (DRI2)
EGL_VENDOR: Mesa Project
EGL_EXTENSIONS:
    EGL_MESA_drm_image, EGL_WL_bind_wayland_display, EGL_KHR_image_base, 
    EGL_KHR_image_pixmap, EGL_KHR_image, EGL_KHR_gl_texture_2D_image, 
    EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image, 
    EGL_KHR_surfaceless_context, EGL_KHR_create_context, EGL_NOK_swap_region, 
    EGL_NOK_texture_from_pixmap, EGL_EXT_create_context_robustness, 
    EGL_EXT_image_dma_buf_import, EGL_NV_post_sub_buffer
EGL_CLIENT_APIS: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3 
GL_VERSION: OpenGL ES 3.0 Mesa 10.1.3
GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile 
GL_EXTENSIONS:
    GL_EXT_blend_minmax, GL_EXT_multi_draw_arrays, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_format_BGRA8888, GL_OES_compressed_ETC1_RGB8_texture, 
    GL_OES_depth24, GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 
    GL_OES_mapbuffer, GL_OES_rgb8_rgba8, GL_OES_standard_derivatives, 
    GL_OES_stencil8, GL_OES_texture_3D, GL_OES_texture_npot, 
    GL_OES_EGL_image, GL_OES_depth_texture, GL_OES_packed_depth_stencil, 
    GL_EXT_texture_type_2_10_10_10_REV, GL_OES_get_program_binary, 
    GL_APPLE_texture_max_level, GL_EXT_discard_framebuffer, 
    GL_EXT_read_format_bgra, GL_NV_fbo_color_attachments, 
    GL_OES_EGL_image_external, GL_OES_vertex_array_object, 
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_EXT_texture_rg, GL_EXT_unpack_subimage, GL_NV_draw_buffers, 
    GL_NV_read_buffer, GL_EXT_map_buffer_range, GL_OES_depth_texture_cube_map, 
    GL_OES_surfaceless_context, GL_EXT_color_buffer_float, 
    GL_EXT_shader_integer_mix
SampleBrowser reports:

Code: Select all

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
ArchiveFactory for archive type EmbeddedZip registered.
DDS codec registering
FreeImage version: 3.15.4
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti
PVRTC codec registering
ETC codec registering
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
Loading library /usr/lib/OGRE/RenderSystem_GL
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/lib/OGRE/RenderSystem_GLES2
Installing plugin: OpenGL ES 2.0 RenderSystem
OpenGL ES 2.x Rendering Subsystem created.
libEGL warning: failed to create a pipe screen for i965
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_ParticleFX
Installing plugin: ParticleFX
Particle Emitter Type 'Point' registered
Particle Emitter Type 'Box' registered
Particle Emitter Type 'Ellipsoid' registered
Particle Emitter Type 'Cylinder' registered
Particle Emitter Type 'Ring' registered
Particle Emitter Type 'HollowEllipsoid' registered
Particle Affector Type 'LinearForce' registered
Particle Affector Type 'ColourFader' registered
Particle Affector Type 'ColourFader2' registered
Particle Affector Type 'ColourImage' registered
Particle Affector Type 'ColourInterpolator' registered
Particle Affector Type 'Scaler' registered
Particle Affector Type 'Rotator' registered
Particle Affector Type 'DirectionRandomiser' registered
Particle Affector Type 'DeflectorPlane' registered
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_BSPSceneManager
Installing plugin: BSP Scene Manager
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_PCZSceneManager
Installing plugin: Portal Connected Zone Scene Manager
PCZone Factory Type 'ZoneType_Default' registered
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_OctreeZone
Installing plugin: Octree Zone Factory
Plugin successfully installed
Loading library /usr/lib/OGRE/Plugin_OctreeSceneManager
Installing plugin: Octree Scene Manager
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 1.9.0 (Ghadamon)
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
CPU Identifier & Features
-------------------------
 *   CPU ID: GenuineIntel: Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz
 *      SSE: yes
 *     SSE2: yes
 *     SSE3: yes
 *      MMX: yes
 *   MMXEXT: yes
 *    3DNOW: no
 * 3DNOWEXT: no
 *     CMOV: yes
 *      TSC: yes
 *      FPU: yes
 *      PRO: yes
 *       HT: no
-------------------------
Registering ResourceManager for type Texture
GLES2RenderSystem::_createRenderWindow "OGRE Sample Browser", 3520x1200 windowed  miscParams: FSAA=0 displayFrequency=0 MHz 
EGLWindow::create used FBConfigID = 18
Segmentation fault (core dumped)
gdb reports nothing useful:

Code: Select all

...
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe7370200 in ?? ()
One peculiar thing is that the Rendering Settings dialog does not display anything besides 0 MHz for Display Frequency and nothing but my full screen resolution for Video Mode even though I can turn Full Screen off.

What might be the issue?
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: SampleBrowser segfaults with GLES2

Post by spacegaier »

ayberkozgur wrote:One peculiar thing is that the Rendering Settings dialog does not display anything besides 0 MHz for Display Frequency and nothing but my full screen resolution for Video Mode even though I can turn Full Screen off.
Does that change if you delete the ogre.cfg config file?
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
ayberkozgur
Gnoblar
Posts: 3
Joined: Wed Sep 17, 2014 5:29 pm
Location: Lausanne, Switzerland
x 2

Re: SampleBrowser segfaults with GLES2

Post by ayberkozgur »

spacegaier wrote:
ayberkozgur wrote:One peculiar thing is that the Rendering Settings dialog does not display anything besides 0 MHz for Display Frequency and nothing but my full screen resolution for Video Mode even though I can turn Full Screen off.
Does that change if you delete the ogre.cfg config file?
The ogre.cfg file is created automatically after I launch SampleBrowser. It is like this when it's created:

Code: Select all

Render System=OpenGL ES 2.x Rendering Subsystem

[OpenGL Rendering Subsystem]
Display Frequency=60 Hz
FSAA=0
Fixed Pipeline Enabled=Yes
Full Screen=Yes
RTT Preferred Mode=FBO
VSync=No
Video Mode=1600 x  900
sRGB Gamma Conversion=No

[OpenGL ES 2.x Rendering Subsystem]
Display Frequency=0 MHz
FSAA=0
Full Screen=Yes
RTT Preferred Mode=FBO
Video Mode=3520 x 1200
After that, I can change it to this but still it segfaults:

Code: Select all

Render System=OpenGL ES 2.x Rendering Subsystem

[OpenGL Rendering Subsystem]
Display Frequency=60 Hz
FSAA=0
Fixed Pipeline Enabled=Yes
Full Screen=Yes
RTT Preferred Mode=FBO
VSync=No
Video Mode=1600 x  900
sRGB Gamma Conversion=No

[OpenGL ES 2.x Rendering Subsystem]
Display Frequency=60 Hz
FSAA=0
Full Screen=No
RTT Preferred Mode=FBO
Video Mode=800 x  600
User avatar
nuke
Halfling
Posts: 72
Joined: Wed Oct 01, 2014 1:16 am
Location: Crimea
x 5

Re: SampleBrowser segfaults with GLES2

Post by nuke »

I have the same problem!

- My OS: Ubuntu 14.04 LTS
- Ogre v1.9 crashes with RenderSystem_GLES2 by "Segmentation Fault (core dumped)" (segfault error)
when calls

Code: Select all

 void GLES2Support::initialiseExtensions(void)
    {
        // Set version string
        const GLubyte* pcVer = glGetString(GL_VERSION); // ##########################  it crashes HERE  ##########################

        assert(pcVer && "Problems getting GL version string using glGetString");

        String tmpStr = (const char*)pcVer;
        LogManager::getSingleton().logMessage("GL_VERSION = " + tmpStr);
        mVersion = tmpStr.substr(0, tmpStr.find(" "));

        // Get vendor
        const GLubyte* pcVendor = glGetString(GL_VENDOR);  // ########################## or HERE (when previous glGetString(GL_VERSION) is commented) ##########################
        tmpStr = (const char*)pcVendor;
        LogManager::getSingleton().logMessage("GL_VENDOR = " + tmpStr);
        mVendor = tmpStr.substr(0, tmpStr.find(" "));

        // Get renderer
        const GLubyte* pcRenderer = glGetString(GL_RENDERER);  // ########################## or HERE (when previous glGetString(GL_VENDOR) is commented) ##########################
        tmpStr = (const char*)pcRenderer;
        LogManager::getSingleton().logMessage("GL_RENDERER = " + tmpStr);

        // Set extension list
        std::stringstream ext;
        String str;

        const GLubyte* pcExt = glGetString(GL_EXTENSIONS);   // ########################## or HERE (when previous glGetString(GL_RENDERER) is commented) ##########################
        LogManager::getSingleton().logMessage("GL_EXTENSIONS = " + String((const char*)pcExt));

        assert(pcExt && "Problems getting GL extension string using glGetString");

        ext << pcExt;

        while (ext >> str)
        {
            LogManager::getSingleton().logMessage("EXT:" + str);
            extensionList.insert(str);
        }
    }
- Ogre is pulled with Hg from BitBucket (lastest branch "v1-9")
- Ogre has been configured with CMake
- Ogre has been builded with make -j (gcc / g++) using command line in Terminal
- Even the most simple program using Eclipse which simply needs to create a yellow screen with Ogre GLES2 crashes with SegFault

BUT!
- I've buided simplest example from Imagination PowerVR SDK 3.1 using Eclipse that simply draws a Triangle.
This example uses the same standart mesa libs libEGL and libGLESv2 (from /usr/lib/i386-linux-gnu/mesa-egl) and works perfect!!!!
And every PowerVR GLES2 example works also fine!

Why SampleBrowser (GLES2) crashes and my simple program (Ogre, GLES2) also crashes ???

The problem I had 6 days!
Please HELP!!!!!!!!!!!!!!!!!!!!!!!
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: SampleBrowser segfaults with GLES2

Post by dark_sylinc »

Providing a callstack would be nice.

I've personally never tried running Ogre with GLES2 under Linux; I've just compiled it, if someone has resources on how to do it, it would be nice (does it just work? do you need to install a special lib? etc)
pulsamor
Gnoblar
Posts: 5
Joined: Tue Feb 25, 2014 8:38 am

Re: SampleBrowser segfaults with GLES2

Post by pulsamor »

i don't know about powerVR but : i m using debian jessie and in libGLESv2.so of mesa 10.2.8, a lot of EXT gl functions arent present or have been rename without EXT suffixe.

i use libs of mali emulator from arm : http://malideveloper.arm.com/develop-fo ... -emulator/
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: SampleBrowser segfaults with GLES2

Post by scrawl »

Providing a callstack would be nice.
Here you go, from v1-9 branch:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe57d6280 in ?? ()
(gdb) bt
#0  0x00007fffe57d6280 in ?? ()
#1  0x00007ffff00779a6 in Ogre::GLES2Support::initialiseExtensions (this=0x66a5c0) at /home/scrawl/Dev/ogre/RenderSystems/GLES2/src/OgreGLES2Support.cpp:58
#2  0x00007ffff0068d8f in Ogre::GLES2RenderSystem::initialiseContext (this=this@entry=0x7ffff7ec9428, primary=primary@entry=0x7ffff7ecc498)
    at /home/scrawl/Dev/ogre/RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp:1996
#3  0x00007ffff006b3d1 in Ogre::GLES2RenderSystem::_createRenderWindow (this=0x7ffff7ec9428, name=..., width=1680, height=1050, fullScreen=<optimized out>, miscParams=0x7fffffffdd20)
    at /home/scrawl/Dev/ogre/RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp:572
#4  0x00007ffff0093d7e in Ogre::EGLSupport::createWindow (this=<optimized out>, autoCreateWindow=<optimized out>, renderSystem=0x7ffff7ec9428, windowTitle=...)
    at /home/scrawl/Dev/ogre/RenderSystems/GLES2/src/EGL/OgreEGLSupport.cpp:477
#5  0x00007ffff006be92 in Ogre::GLES2RenderSystem::_initialise (this=0x7ffff7ec9428, autoCreateWindow=<optimized out>, windowTitle=...)
    at /home/scrawl/Dev/ogre/RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp:179
#6  0x00007ffff78c85fa in Ogre::Root::initialise (this=0x7ffff7ebd5f8, autoCreateWindow=autoCreateWindow@entry=true, windowTitle=..., customCapabilitiesConfig=...)
    at /home/scrawl/Dev/ogre/OgreMain/src/OgreRoot.cpp:701
#7  0x0000000000409f8a in OgreBites::SampleBrowser::createWindow (this=0x7fffffffe090) at /home/scrawl/Dev/ogre/Samples/Browser/include/SampleBrowser.h:1285
#8  0x0000000000415af1 in OgreBites::SampleBrowser::setup (this=0x7fffffffe090) at /home/scrawl/Dev/ogre/Samples/Browser/include/SampleBrowser.h:1084
#9  0x000000000040a8a7 in OgreBites::SampleContext::initApp (this=0x7fffffffe090, initialSample=0x0) at /home/scrawl/Dev/ogre/Samples/Common/include/SampleContext.h:266
#10 0x0000000000409e08 in OgreBites::SampleContext::go (this=this@entry=0x7fffffffe090, initialSample=initialSample@entry=0x0) at /home/scrawl/Dev/ogre/Samples/Common/include/SampleContext.h:323
#11 0x0000000000408c29 in main (argc=<optimized out>, argv=<optimized out>) at /home/scrawl/Dev/ogre/Samples/Browser/src/SampleBrowser.cpp:116
I've personally never tried running Ogre with GLES2 under Linux; I've just compiled it, if someone has resources on how to do it, it would be nice (does it just work? do you need to install a special lib? etc)
All you should need to do is install the libgles2-mesa-dev package.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: SampleBrowser segfaults with GLES2

Post by scrawl »

Got it working... well, sort of.
Image

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));
Any ideas? Anyone?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: SampleBrowser segfaults with GLES2

Post by paroj »

the issue might be that the GLES RS defines GL_GLEXT_PROTOTYPES which should couse a conflict with glesw. However I still need to verify that. In other news you can get rid of glesw alltogether more easily with this PR: https://bitbucket.org/sinbad/ogre/pull- ... w-use/diff
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: SampleBrowser segfaults with GLES2

Post by paroj »

try this one:
https://bitbucket.org/sinbad/ogre/pull- ... sktop/diff

it uses the GL3 compability profile instead of GLES2 directly. works for me.
Post Reply