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:
parent
505285bb22
commit
af2a4a7e2a
6 changed files with 54 additions and 32 deletions
|
|
@ -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
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue