]> git.cworth.org Git - apitrace/blobdiff - glws_glx.cpp
Implement goto start of the frame and goto end of the frame.
[apitrace] / glws_glx.cpp
index 564af90ee3e0ef61006b2a4c829b7b5b098eaaf9..95cdab078951eef107b8936d8a56fa34f3df58b4 100644 (file)
 #include <stdlib.h>
 #include <iostream>
 
-#include "glimports.hpp"
 #include "glws.hpp"
 
 #include <X11/Xlib.h>
+#include <GL/gl.h>
 #include <GL/glx.h>
 
 
@@ -138,9 +138,6 @@ public:
             display, window, name, name,
             None, (char **)NULL, 0, &sizehints);
 
-        XMapWindow(display, window);
-
-        waitForEvent(window, Expose);
         glXWaitX();
     }
 
@@ -175,6 +172,16 @@ public:
         glXWaitX();
     }
 
+    void show(void) {
+        if (!visible) {
+            XMapWindow(display, window);
+
+            waitForEvent(window, Expose);
+
+            Drawable::show();
+        }
+    }
+
     void swapBuffers(void) {
         glXSwapBuffers(display, window);
     }