Complete, simple example for EGL
Ngoc Dao <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAHqXiK=M8iuOkhD25WGuRamr8KR4nnOAffX3nscnufawuwQ69A@mail.gmail.com> |
Hi Cairo developers, I'm investigating the way to use Cairo with OpenGL on Android. As I understand, OpenGL ES 2 with EGL must be used. The only example I can find so far is gl-surface-source.c in the test directory of Cairo source code. But that's not clear for a beginner like me to know how to use. Can someone show me a complete, simple example? Here's my current code so far. It doesn't show anything (I'm using Cairo 1.12.2). https://gist.github.com/4648313 Another thing. Why does cairo_egl_device_create call eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) ? Do I have to call: context = eglCreateContext(display, config, EGL_NO_CONTEXT, eglCreateContextattribs)) again after calling cairo_egl_device_create? Thanks, Ngoc -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo