]> git.cworth.org Git - apitrace/blobdiff - glstate.py
Merge branch 'master' into multi-context
[apitrace] / glstate.py
index f45216f8205040cb70614aaf2eebec5538e461df..34405a5e454bbf83450031bbd51e400448057645 100644 (file)
@@ -430,14 +430,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