From d6716ec31b7399517655403d8963b7632bbbf6b3 Mon Sep 17 00:00:00 2001 From: numzero Date: Thu, 2 Mar 2023 02:41:58 +0300 Subject: [PATCH] Support GLES2 --- source/Irrlicht/COpenGLCoreRenderTarget.h | 12 ++++++++++-- source/Irrlicht/COpenGLCoreTexture.h | 3 --- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source/Irrlicht/COpenGLCoreRenderTarget.h b/source/Irrlicht/COpenGLCoreRenderTarget.h index 7dff3c9..f893c17 100644 --- a/source/Irrlicht/COpenGLCoreRenderTarget.h +++ b/source/Irrlicht/COpenGLCoreRenderTarget.h @@ -10,6 +10,14 @@ #include "IRenderTarget.h" +#ifndef GL_FRAMEBUFFER_INCOMPLETE_FORMATS +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT +#endif + namespace irr { namespace video @@ -351,10 +359,10 @@ protected: case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: os::Printer::log("FBO has one or several incomplete image attachments", ELL_ERROR); break; - case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: + case GL_FRAMEBUFFER_INCOMPLETE_FORMATS: os::Printer::log("FBO has one or several image attachments with different internal formats", ELL_ERROR); break; - case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: + case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: os::Printer::log("FBO has one or several image attachments with different dimensions", ELL_ERROR); break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: diff --git a/source/Irrlicht/COpenGLCoreTexture.h b/source/Irrlicht/COpenGLCoreTexture.h index c19215b..2ad8af1 100644 --- a/source/Irrlicht/COpenGLCoreTexture.h +++ b/source/Irrlicht/COpenGLCoreTexture.h @@ -433,9 +433,6 @@ public: else { #ifdef IRR_OPENGL_HAS_glGenerateMipmap - #if !defined(IRR_COMPILE_GLES2_COMMON) - glEnable(GL_TEXTURE_2D); // Hack some ATI cards need this glEnable according to https://www.khronos.org/opengl/wiki/Common_Mistakes - #endif Driver->irrGlGenerateMipmap(TextureType); #endif }