[cogl/wip/rob/kms-winsys: 1/2] examples: Query the size of the framebuffer
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/rob/kms-winsys: 1/2] examples: Query the size of the framebuffer
- Date: Mon, 14 Nov 2011 17:57:09 +0000 (UTC)
commit 718e84f69ae96361916d8b5d27f53716cde830f7
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.
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]