]> git.cworth.org Git - apitrace/blobdiff - glstate.cpp
D3D retrace checkpoint.
[apitrace] / glstate.cpp
index 6b9c0723d0dcc8b2a18044bf6c071b9a805dd67a..d54764ce7bf5e8b6c9b8db59bc420e88bebfa5a0 100644 (file)
@@ -738,6 +738,7 @@ getDrawableBounds(GLint *width, GLint *height) {
 
 #else
 
+#if !TRACE_EGL
     Display *display;
     Drawable drawable;
     Window root;
@@ -760,6 +761,9 @@ getDrawableBounds(GLint *width, GLint *height) {
 
     *width = w;
     *height = h;
+#else
+    return false;
+#endif
 
 #endif
 
@@ -949,7 +953,8 @@ getFramebufferAttachmentFormat(GLenum target, GLenum attachment)
 
 
 image::Image *
-getDrawBufferImage(GLenum format) {
+getDrawBufferImage() {
+    GLenum format = GL_RGB;
     GLint channels = __gl_format_channels(format);
     if (channels > 4) {
         return NULL;
@@ -1200,7 +1205,10 @@ dumpDrawableImages(JSONWriter &json)
         glGetIntegerv(GL_READ_BUFFER, &read_buffer);
 
         GLint alpha_bits = 0;
+#if 0
+        // XXX: Ignore alpha until we are able to match the traced visual
         glGetIntegerv(GL_ALPHA_BITS, &alpha_bits);
+#endif
         GLenum format = alpha_bits ? GL_RGBA : GL_RGB;
         json.beginMember(enumToString(draw_buffer));
         dumpReadBufferImage(json, width, height, format);
@@ -1225,6 +1233,8 @@ dumpDrawableImages(JSONWriter &json)
         json.endMember();
     }
 }
+
+
 /**
  * Dump the specified framebuffer attachment.
  *