def call_function(self, function):
if function.name == "glViewport":
+ print ' bool reshape_window = false;'
print ' if (x + width > glretrace::window_width) {'
print ' glretrace::window_width = x + width;'
- print ' glretrace::reshape_window = true;'
+ print ' reshape_window = true;'
print ' }'
print ' if (y + height > glretrace::window_height) {'
print ' glretrace::window_height = y + height;'
- print ' glretrace::reshape_window = true;'
+ print ' reshape_window = true;'
+ print ' }'
+ print ' if (reshape_window) {'
+ print ' // XXX: does not always work'
+ print ' glretrace::drawable->resize(glretrace::window_width, glretrace::window_height);'
+ print ' reshape_window = false;'
print ' }'
if function.name == "glEnd":
glws::Context *context = NULL;
int window_width = 256, window_height = 256;
-bool reshape_window = false;
unsigned frame = 0;
long long startTime = 0;
static void frame_complete(void) {
++frame;
- if (!reshape_window && (snapshot_prefix || compare_prefix)) {
+ if (snapshot_prefix || compare_prefix) {
Image::Image *ref = NULL;
if (compare_prefix) {
char filename[PATH_MAX];
}
}
- if (reshape_window) {
- // XXX: doesn't quite work
- drawable->resize(window_width, window_height);
- reshape_window = false;
- }
-
ws->processEvents();
}