From a665ba7cf6de6e071538f64104b122e6bbb1a6b1 Mon Sep 17 00:00:00 2001 From: Alexandros Frantzis Date: Fri, 2 Dec 2011 14:22:56 +0200 Subject: [PATCH] Cast native types to EGL types when calling EGL functions. This is needed to resolve build failures on some platforms that support various EGL backends and, therefore, native types. Note that we can't use reinterpret_cast<>() as the types involved are not necessarily pointers or integers e.g. they can be typedef-ed types. --- glws_egl_xlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glws_egl_xlib.cpp b/glws_egl_xlib.cpp index d614d78..d127705 100644 --- a/glws_egl_xlib.cpp +++ b/glws_egl_xlib.cpp @@ -137,7 +137,7 @@ public: eglWaitNative(EGL_CORE_NATIVE_ENGINE); EGLConfig config = static_cast(visual)->config; - surface = eglCreateWindowSurface(eglDisplay, config, window, NULL); + surface = eglCreateWindowSurface(eglDisplay, config, (EGLNativeWindowType)window, NULL); } void waitForEvent(int type) { @@ -245,7 +245,7 @@ init(void) { screen = DefaultScreen(display); - eglDisplay = eglGetDisplay(display); + eglDisplay = eglGetDisplay((EGLNativeDisplayType)display); if (eglDisplay == EGL_NO_DISPLAY) { std::cerr << "error: unable to get EGL display\n"; XCloseDisplay(display); -- 2.7.4