diff options
author | Rob Bradford <rob@linux.intel.com> | 2011-11-07 17:00:20 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-11-14 18:59:52 +0000 |
commit | 3bf8d45529b22769890c042736849767369e3fc5 (patch) | |
tree | fa4fc76e86a0609d6f9378a56c18a40921e109e6 /examples | |
parent | 39ca3e51dfaa652ae4a0d936fff32a5edaca6c5f (diff) | |
download | cogl-3bf8d45529b22769890c042736849767369e3fc5.tar.gz |
examples: Query the size of the framebuffer
The size of the framebuffer may not be the size of the framebuffer that we
requested - we should use the actual size of the framebuffer in the
calculations to position the crate in the center.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cogl-crate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/cogl-crate.c b/examples/cogl-crate.c index da333285..fa9d86f2 100644 --- a/examples/cogl-crate.c +++ b/examples/cogl-crate.c @@ -164,6 +164,9 @@ main (int argc, char **argv) return 1; } + data.framebuffer_width = cogl_framebuffer_get_width (fb); + data.framebuffer_height = cogl_framebuffer_get_height (fb); + data.timer = g_timer_new (); cogl_onscreen_show (onscreen); |