summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2015-01-04 13:36:45 -0800
committerChad Versace <chad.versace@intel.com>2015-01-27 09:36:06 -0800
commitaa89036b413b88a0015cf92a583565df0ea30f11 (patch)
tree6eebad4e5dbe3c2ff8a2a78ea421c74c6deaa809
parente2d6541d2080eb8d914ffdb8874a62d58b501150 (diff)
examples/gl_basic: Update to use waffle_window_create2()
Tested on GLX, X11/EGL, Wayland, and GBM. Signed-off-by: Chad Versace <chad.versace@intel.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--examples/gl_basic.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/gl_basic.c b/examples/gl_basic.c
index 69418c8..77bb1dc 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>
@@ -530,6 +530,7 @@ main(int argc, char **argv)
int32_t init_attrib_list[3];
int32_t config_attrib_list[64];
+ intptr_t window_attrib_list[5];
struct waffle_display *dpy;
struct waffle_config *config;
@@ -628,7 +629,15 @@ main(int argc, char **argv)
if (!ctx)
error_waffle();
- window = waffle_window_create(config, window_width, window_height);
+
+ i = 0;
+ window_attrib_list[i++] = WAFFLE_WINDOW_WIDTH;
+ window_attrib_list[i++] = window_width;
+ window_attrib_list[i++] = WAFFLE_WINDOW_HEIGHT;
+ window_attrib_list[i++] = window_height;
+ window_attrib_list[i++] = 0;
+
+ window = waffle_window_create2(config, window_attrib_list);
if (!window)
error_waffle();