diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-12-13 20:26:51 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-12-13 20:26:51 +0000 |
commit | 83a1e15744d6aa49514a9b7a5c0354c3d3b059cf (patch) | |
tree | 366b50afb1664aae0716c556cd141c390e2f96a1 /glretrace.py | |
parent | 7fe1dc57d2249236b83aa1a78001a9245d6e1681 (diff) |
Silence warnings a little bit.
Diffstat (limited to 'glretrace.py')
-rw-r--r-- | glretrace.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/glretrace.py b/glretrace.py index a66d5d2b..9d6b1fd5 100644 --- a/glretrace.py +++ b/glretrace.py @@ -266,24 +266,32 @@ static void display(void) { Trace::Call *call; while ((call = parser.parse_call())) { - if (call->name() == "glFlush") { - glFlush(); - if (!double_buffer) { - frame_complete(); - } - } - - if (!retrace_call(*call)) { - if (call->name() == "glXSwapBuffers" || - call->name() == "wglSwapBuffers") { + const std::string &name = call->name(); + + if ((name[0] == 'w' && name[1] == 'g' && name[2] == 'l') || + (name[0] == 'g' && name[1] == 'l' && name[2] == 'X')) { + // XXX: We ignore the majority of the OS-specific calls for now + if (name == "glXSwapBuffers" || + name == "wglSwapBuffers") { if (double_buffer) glutSwapBuffers(); else glFlush(); frame_complete(); return; + } else { + continue; } } + + if (name == "glFlush") { + glFlush(); + if (!double_buffer) { + frame_complete(); + } + } + + retrace_call(*call); } // Reached the end of trace |