Why is bindVertexArray called when component rendering has been disabled?

I’m trying to configure some shaders and normal GL things of my own in a custom renderer. Unfortunately, the screen renders black. …that is until I remove the call to bindVertexArray in JUCE’s GL code.

It looks like this binds to an array that is entirely destined to manage Component painting… so why is this called in the block for a custom renderer?

Agree that JUCE shouldn’t bind that VAO if it’s not being used anyway. It should probably be moved inside that if (context.renderComponents) { ... } conditional from what I can tell

My approach has been to always operations like binding VAOs and such in renderOpenGL(), right before they’re needed… although we have to do that anyway since we use component painting as well as multiple VAOs in our plugins :slight_smile:

TBH, it shouldn’t even be allocated at all if component drawing is disabled.

1 Like