glGetError without Active Context Bug


#1

Er, Jules - like the GL errors stuff, but you can’t call OpenGL functions without an active context.

Just needs that first test to be removed. EDIT - both tests before the makeActive.

Bruce

[code]bool OpenGLComponent::performRender()
{
JUCE_CHECK_OPENGL_ERROR

const ScopedLock sl (contextLock);

#if JUCE_LINUX
updateContext();
#endif

JUCE_CHECK_OPENGL_ERROR

if (context != nullptr)
{
    if (! makeCurrentRenderingTarget())
        return false;[/code]

#2

Ah yes, sorry, I was slapping them all over the place for some android debugging. Will remove those two!


#3

FYI, my personal version of that pattern has a string also, so I get a quick print-out/variable read of what my code was doing and the resulting GL error.

Invaluable.

Bruce


#4

Yeah, I figured that the file/line would be easier than typing strings in everywhere…