[waffle] [PATCH 11/11] examples/gl_basic: Update to use waffle_window_create2()
Chad Versace
chad.versace at linux.intel.com
Tue Dec 16 00:18:35 PST 2014
Tested on GLX, X11/EGL, Wayland, and GBM.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
examples/gl_basic.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/examples/gl_basic.c b/examples/gl_basic.c
index fb62d52..4eb2d19 100644
--- a/examples/gl_basic.c
+++ b/examples/gl_basic.c
@@ -34,7 +34,7 @@
/// each buffer swap.
#define _POSIX_C_SOURCE 199309L // glibc feature macro for nanosleep.
-#define WAFFLE_API_VERSION 0x0103
+#define WAFFLE_API_VERSION 0x0106
#define WAFFLE_API_EXPERIMENTAL
#include <getopt.h>
@@ -524,6 +524,12 @@ main(int argc, char **argv)
struct waffle_context *ctx;
struct waffle_window *window;
+ const intptr_t window_attrib_list[] = {
+ WAFFLE_WINDOW_WIDTH, WINDOW_WIDTH,
+ WAFFLE_WINDOW_HEIGHT, WINDOW_HEIGHT,
+ 0,
+ };
+
GLint context_flags = 0;
#ifdef __APPLE__
@@ -616,7 +622,7 @@ main(int argc, char **argv)
if (!ctx)
error_waffle();
- window = waffle_window_create(config, WINDOW_WIDTH, WINDOW_HEIGHT);
+ window = waffle_window_create2(config, window_attrib_list);
if (!window)
error_waffle();
--
2.2.0
More information about the waffle
mailing list