From: Alexandros Frantzis Date: Fri, 2 Dec 2011 12:22:56 +0000 (+0200) Subject: Cast native types to EGL types when calling EGL functions. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a665ba7cf6de6e071538f64104b122e6bbb1a6b1;p=apitrace 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. --- 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);