]> git.cworth.org Git - apitrace/blobdiff - glstate.py
Merge branch 'master' into multi-context
[apitrace] / glstate.py
index 89d92badf3c9500f4b38fc54f716b1e4890f1aeb..db0152feea92fc42a8826551f2ab58cc54528274 100644 (file)
@@ -428,14 +428,14 @@ writeTextureImage(JSONWriter &json, GLenum target, GLint level)
 static inline void
 writeDrawBufferImage(JSONWriter &json, GLenum format)
 {
-    GLint width  = glretrace::window_width;
-    GLint height = glretrace::window_height;
-
     GLint channels = __gl_format_channels(format);
 
-    if (!width || !height) {
+    if (!glretrace::drawable) {
         json.writeNull();
     } else {
+        GLint width  = glretrace::drawable->width;
+        GLint height = glretrace::drawable->height;
+
         json.beginObject();
 
         // Tell the GUI this is no ordinary object, but an image