1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

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

This commit is contained in:
jules 2015-05-25 09:36:11 +01:00
parent f4fe4c5749
commit 2a15b88dc3

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);