[cogl] examples: Query the size of the framebuffer
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] examples: Query the size of the framebuffer
- Date: Tue, 15 Nov 2011 10:59:22 +0000 (UTC)
commit 3bf8d45529b22769890c042736849767369e3fc5
Author: Rob Bradford <rob linux intel com>
Date: Mon Nov 7 17:00:20 2011 +0000
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>
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 da33328..fa9d86f 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]