X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glstate.py;h=34405a5e454bbf83450031bbd51e400448057645;hb=c017dded3f1b3ebe3043b0e217bb3cd76a4e1a4e;hp=f45216f8205040cb70614aaf2eebec5538e461df;hpb=4d7f1fec7a1561d474592b2b05b43685a29e8426;p=apitrace diff --git a/glstate.py b/glstate.py index f45216f..34405a5 100644 --- a/glstate.py +++ b/glstate.py @@ -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