From 6b12864a7b46a403c3e8e12f97f7ece3a2273168 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 1 Feb 2021 13:22:40 +0000 Subject: [PATCH] Ensure pixel pack/unpack buffers don't break overlays on GL --- util/test/demos/gl/gl_overlay_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/test/demos/gl/gl_overlay_test.cpp b/util/test/demos/gl/gl_overlay_test.cpp index 1ca96e88e..8a04cc0d4 100644 --- a/util/test/demos/gl/gl_overlay_test.cpp +++ b/util/test/demos/gl/gl_overlay_test.cpp @@ -232,6 +232,12 @@ void main() glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, subtex, 3, 2); + // keep a trash buffer bound to pixel pack/unpack + GLuint trash = MakeBuffer(); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, trash); + glBufferStorage(GL_PIXEL_UNPACK_BUFFER, 1024, 0, 0); + glBindBuffer(GL_PIXEL_PACK_BUFFER, trash); + while(Running()) { glBindVertexArray(vao);