mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
OpenGL: Ensure a VAO is bound before calling user render callback
This commit is contained in:
parent
e4b8569b12
commit
17deafbb0d
2 changed files with 3 additions and 4 deletions
|
|
@ -763,6 +763,7 @@ public:
|
|||
controlsOverlay.reset (new DemoControlsOverlay (*this));
|
||||
addAndMakeVisible (controlsOverlay.get());
|
||||
|
||||
openGLContext.setOpenGLVersionRequired (OpenGLContext::openGL3_2);
|
||||
openGLContext.setRenderer (this);
|
||||
openGLContext.attachTo (*this);
|
||||
openGLContext.setContinuousRepainting (true);
|
||||
|
|
|
|||
|
|
@ -195,9 +195,6 @@ public:
|
|||
if (context.renderer != nullptr)
|
||||
context.renderer->openGLContextClosing();
|
||||
|
||||
if (vertexArrayObject != 0)
|
||||
context.extensions.glDeleteVertexArrays (1, &vertexArrayObject);
|
||||
|
||||
associatedObjectNames.clear();
|
||||
associatedObjects.clear();
|
||||
cachedImageFrameBuffer.release();
|
||||
|
|
@ -400,6 +397,8 @@ public:
|
|||
|
||||
if (context.renderer != nullptr)
|
||||
{
|
||||
OpenGLRendering::SavedBinding<OpenGLRendering::TraitsVAO> vaoBinding;
|
||||
|
||||
glViewport (0, 0, viewportArea.getWidth(), viewportArea.getHeight());
|
||||
context.currentRenderScale = currentAreaAndScale.scale;
|
||||
context.renderer->renderOpenGL();
|
||||
|
|
@ -955,7 +954,6 @@ public:
|
|||
RectangleList<int> validArea;
|
||||
Rectangle<int> lastScreenBounds;
|
||||
AffineTransform transform;
|
||||
GLuint vertexArrayObject = 0;
|
||||
LockedAreaAndScale areaAndScale;
|
||||
|
||||
StringArray associatedObjectNames;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue