mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
OpenGL: Reduce error checking in Release builds
This commit is contained in:
parent
ff1d5d6da4
commit
18aaa86761
2 changed files with 9 additions and 4 deletions
|
|
@ -215,7 +215,9 @@ static void checkGLError (const char* file, const int line)
|
|||
|
||||
static void clearGLError() noexcept
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
while (glGetError() != GL_NO_ERROR) {}
|
||||
#endif
|
||||
}
|
||||
|
||||
struct OpenGLTargetSaver
|
||||
|
|
|
|||
|
|
@ -228,16 +228,19 @@ private:
|
|||
{
|
||||
#if JUCE_DEBUG
|
||||
constexpr auto contextFlags = WGL_CONTEXT_DEBUG_BIT_ARB;
|
||||
constexpr auto noErrorChecking = GL_FALSE;
|
||||
#else
|
||||
constexpr auto contextFlags = 0;
|
||||
constexpr auto noErrorChecking = GL_TRUE;
|
||||
#endif
|
||||
|
||||
const int attribs[] =
|
||||
{
|
||||
WGL_CONTEXT_MAJOR_VERSION_ARB, components->major,
|
||||
WGL_CONTEXT_MINOR_VERSION_ARB, components->minor,
|
||||
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
WGL_CONTEXT_FLAGS_ARB, contextFlags,
|
||||
WGL_CONTEXT_MAJOR_VERSION_ARB, components->major,
|
||||
WGL_CONTEXT_MINOR_VERSION_ARB, components->minor,
|
||||
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
WGL_CONTEXT_FLAGS_ARB, contextFlags,
|
||||
WGL_CONTEXT_OPENGL_NO_ERROR_ARB, noErrorChecking,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue