Editing SimpleGL example
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 13: | Line 13: | ||
#include <iostream> | #include <iostream> | ||
- | |||
- | |||
using namespace std; | using namespace std; | ||
Line 22: | Line 20: | ||
#include <X11/Xlib.h> | #include <X11/Xlib.h> | ||
#include <X11/Xatom.h> | #include <X11/Xatom.h> | ||
- | |||
#include <GLES2/gl2.h> | #include <GLES2/gl2.h> | ||
Line 105: | Line 102: | ||
EGLDisplay egl_display; | EGLDisplay egl_display; | ||
EGLContext egl_context; | EGLContext egl_context; | ||
- | |||
GLfloat | GLfloat | ||
Line 121: | Line 117: | ||
+ | EGLSurface egl_surface; | ||
bool update_pos = false; | bool update_pos = false; | ||
Line 222: | Line 219: | ||
XChangeProperty ( | XChangeProperty ( | ||
x_display, win, | x_display, win, | ||
- | XInternAtom ( x_display, "_HILDON_NON_COMPOSITED_WINDOW", | + | XInternAtom ( x_display, "_HILDON_NON_COMPOSITED_WINDOW", True ), |
XA_INTEGER, 32, PropModeReplace, | XA_INTEGER, 32, PropModeReplace, | ||
(unsigned char*) &one, 1); | (unsigned char*) &one, 1); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
XMapWindow ( x_display , win ); // make the window visible on the screen | XMapWindow ( x_display , win ); // make the window visible on the screen | ||
Line 290: | Line 282: | ||
} | } | ||
- | egl_surface = eglCreateWindowSurface ( egl_display, ecfg, win, NULL ); | + | egl_surface = eglCreateWindowSurface ( egl_display, ecfg, (void*)win, NULL ); |
if ( egl_surface == EGL_NO_SURFACE ) { | if ( egl_surface == EGL_NO_SURFACE ) { | ||
cerr << "Unable to create EGL surface (eglError: " << eglGetError() << ")" << endl; | cerr << "Unable to create EGL surface (eglError: " << eglGetError() << ")" << endl; |
Learn more about Contributing to the wiki.