diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index 36937b8669..90c270c36e 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -289,6 +289,11 @@ public: glBindTexture (GL_TEXTURE_2D, cachedImageFrameBuffer.getTextureID()); + #if JUCE_OPENGL3 + if (vertexArrayObject != 0) + glBindVertexArray (vertexArrayObject); + #endif + const Rectangle cacheBounds (cachedImageFrameBuffer.getWidth(), cachedImageFrameBuffer.getHeight()); context.copyTexture (cacheBounds, cacheBounds, cacheBounds.getWidth(), cacheBounds.getHeight(), false); glBindTexture (GL_TEXTURE_2D, 0);