]> git.cworth.org Git - apitrace/commitdiff
glretrace: Flush outstanding requests when waiting for user input.
authorCarl Worth <cworth@cworth.org>
Thu, 21 Mar 2013 22:52:19 +0000 (15:52 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 12 Apr 2013 09:50:11 +0000 (10:50 +0100)
This helps make "apitrace replay -sb" work in cases where the driver
really only exposes double-buffered rendering, (so a flush is required
to make anything appear if the trace doesn't include a final
SwapBuffers).

retrace/glretrace_main.cpp

index 3645b4f3978cde994afab5da7b86176df15d8687..d215133cbff906ff3c6e912bb574ee834dfc8a7d 100755 (executable)
@@ -479,6 +479,11 @@ retrace::flushRendering(void) {
 
 void
 retrace::waitForInput(void) {
+    glretrace::Context *currentContext = glretrace::getCurrentContext();
+    if (currentContext) {
+        glretrace::flushQueries();
+        glFlush();
+    }
     while (glws::processEvents()) {
         os::sleep(100*1000);
     }