Support GLES2

This commit is contained in:
numzero 2023-03-02 02:41:58 +03:00
parent 620f4869a1
commit d6716ec31b
2 changed files with 10 additions and 5 deletions

@ -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:

@ -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
}