1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OpenGL: Avoid enabling GL_TEXTURE_2D in core profile contexts

This commit is contained in:
reuk 2023-03-06 11:40:35 +00:00
parent 505285bb22
commit af2a4a7e2a
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
6 changed files with 54 additions and 32 deletions

View file

@ -240,22 +240,6 @@ private:
OpenGLTargetSaver& operator= (const OpenGLTargetSaver&);
};
static bool contextRequiresTexture2DEnableDisable()
{
#if JUCE_OPENGL_ES
return false;
#else
clearGLError();
GLint mask = 0;
glGetIntegerv (GL_CONTEXT_PROFILE_MASK, &mask);
if (glGetError() == GL_INVALID_ENUM)
return true;
return (mask & (GLint) GL_CONTEXT_CORE_PROFILE_BIT) == 0;
#endif
}
} // namespace juce
//==============================================================================