Browse Source

Fix for GL 2D rendering when used with user-code which unbinds the VAO.

tags/2021-05-28
jules 10 years ago
parent
commit
2a15b88dc3
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/juce_opengl/opengl/juce_OpenGLContext.cpp

+ 5
- 0
modules/juce_opengl/opengl/juce_OpenGLContext.cpp View File

@@ -289,6 +289,11 @@ public:
glBindTexture (GL_TEXTURE_2D, cachedImageFrameBuffer.getTextureID());
#if JUCE_OPENGL3
if (vertexArrayObject != 0)
glBindVertexArray (vertexArrayObject);
#endif
const Rectangle<int> cacheBounds (cachedImageFrameBuffer.getWidth(), cachedImageFrameBuffer.getHeight());
context.copyTexture (cacheBounds, cacheBounds, cacheBounds.getWidth(), cacheBounds.getHeight(), false);
glBindTexture (GL_TEXTURE_2D, 0);


Loading…
Cancel
Save