Imagination PowerVR SDK Blog

EGL window Handle error


#1

Well, I’m trying to draw over a gtk# window in Linux Embedded. The fact is that Egl/openglesv2 only starts if :


  1. eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list) with “dpy” = 0


  2. CreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list) with “win” pointing to a 0






But in this case, the window opened is not over the GTK# window.





If the display for eglCreateContext or the windowhandle for eglCreateWindowSurface are obtained from gdk (X11), the execution of createContext and createWindowSurface always returns the errors about





EGL_BAD_DISPLAY or EGL_BAD_NATIVE_WINDOW (respectively)





So, How can I do to start the openglesv2 app over a gtk window?





Can I use the display or the window handle pointing to a different place than zero for initializing EGL (context and surface)??





aRc2011-09-27 14:04:36