summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandros Frantzis <alexandros.frantzis@linaro.org>2011-12-02 14:22:56 +0200
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-12-03 10:02:04 +0000
commita665ba7cf6de6e071538f64104b122e6bbb1a6b1 (patch)
tree8fa656310c32d690583881e77173fdd7c438f6dd
parent4a3917d27cfc37071595b9544ec5775d8ce39c7b (diff)
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.
-rw-r--r--glws_egl_xlib.cpp4
1 files 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<const EglVisual *>(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);