[fixed]COpenGLCoreTexture.h: glGenerateMipMap in GLES2
Posted: Thu May 28, 2020 3:13 pm
Hi,
there seems to be something wrong with glGenerateMipMap in COpenGLCoreTexture.h:
In this line I get an GL_INVALID_ENUM error when I run this on linux or a real Android device. In the Android emulator I get an GL_INVALID_OPERATION . However the enum parameter is correct (GL_TEXTURE_2D).
I noticed when I remove the following ATI workaround it works on Linux and the real Android device without errors:
However in the emulator I still get the GL_INVALID_OPERATION error. I remember that there were no problems there with an old emulator a year ago (unfortunately I've updated Android Studio on all my machines).
As a workaround I now simply use:
This currently works for me (on my real devices) but I have a bad feeling about this since it still does not work in the emulator.
Any ideas?
there seems to be something wrong with glGenerateMipMap in COpenGLCoreTexture.h:
In this line I get an GL_INVALID_ENUM error when I run this on linux or a real Android device. In the Android emulator I get an GL_INVALID_OPERATION . However the enum parameter is correct (GL_TEXTURE_2D).
I noticed when I remove the following ATI workaround it works on Linux and the real Android device without errors:
Code: Select all
glEnable(GL_TEXTURE_2D); // Hack some ATI cards need this glEnable according to https://www.khronos.org/opengl/wiki/Common_Mistakes
Driver->irrGlGenerateMipmap(TextureType);
As a workaround I now simply use:
Code: Select all
#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);
Driver->testGLError(__LINE__);
Any ideas?