]> git.cworth.org Git - apitrace/blobdiff - retrace/glstate_images.cpp
image: make getDrawBufferImage() work for ES or !ARB_draw_buffers
[apitrace] / retrace / glstate_images.cpp
index 7b0a42473fdf97cbc8c04ad4910247d078d4b2cf..f3949b51d2182d8437a192311649a3057a8b4214 100644 (file)
@@ -745,6 +745,8 @@ getDrawBufferImage() {
             if (draw_buffer == GL_NONE) {
                 return NULL;
             }
+        } else {
+            draw_buffer = GL_COLOR_ATTACHMENT0;
         }
 
         if (!getFramebufferAttachmentDesc(context, framebuffer_target, draw_buffer, desc)) {
@@ -756,6 +758,8 @@ getDrawBufferImage() {
             if (draw_buffer == GL_NONE) {
                 return NULL;
             }
+        } else {
+            draw_buffer = GL_COLOR_ATTACHMENT0;
         }
 
         if (!getDrawableBounds(&desc.width, &desc.height)) {