Commits

Murat Sari committed b4abe7b

Apply Fix [541] for GLES/GLES2

  • Participants
  • Parent commits 0979eec
  • Branches v1-8

Comments (0)

Files changed (6)

RenderSystems/GLES/include/OgreGLESTextureManager.h

             bool isHardwareFilteringSupported(TextureType ttype, PixelFormat format, int usage,
                                               bool preciseFormatOnly = false);
     protected:
+        friend class GLESRenderSystem;
+        
         /// @copydoc ResourceManager::createImpl
         Resource* createImpl(const String& name, ResourceHandle handle,
                              const String& group, bool isManual, ManualResourceLoader* loader, 

RenderSystems/GLES/src/OgreGLESRenderSystem.cpp

             GL_CHECK_ERROR;
             LogManager::getSingleton().logMessage("Using FSAA OpenGL ES.");
         }
+        
+        static_cast<GLESTextureManager*>(mTextureManager)->createWarningTexture();
     }
 
     void GLESRenderSystem::initialiseContext(RenderWindow* primary)

RenderSystems/GLES/src/OgreGLESTextureManager.cpp

         GL_CHECK_ERROR;
         // Register with group manager
         ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
-
-        createWarningTexture();
     }
 
     GLESTextureManager::~GLESTextureManager()

RenderSystems/GLES2/include/OgreGLES2TextureManager.h

             bool isHardwareFilteringSupported(TextureType ttype, PixelFormat format, int usage,
                                               bool preciseFormatOnly = false);
     protected:
+        friend class GLES2RenderSystem;
+        
         /// @copydoc ResourceManager::createImpl
         Resource* createImpl(const String& name, ResourceHandle handle,
                              const String& group, bool isManual, ManualResourceLoader* loader, 

RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp

     void GLES2RenderSystem::_oneTimeContextInitialization()
     {
 		glDisable(GL_DITHER);
+        static_cast<GLES2TextureManager*>(mTextureManager)->createWarningTexture();
     }
 
     void GLES2RenderSystem::initialiseContext(RenderWindow* primary)

RenderSystems/GLES2/src/OgreGLES2TextureManager.cpp

         GL_CHECK_ERROR;
         // Register with group manager
         ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
-
-        createWarningTexture();
     }
 
     GLES2TextureManager::~GLES2TextureManager()