Creating OFF SCREEN surface using Open GL ES 2.0

3k views Asked by At

I want to draw a scenario using OpenGL ES 2.0 by creating user defined surface during EGL initialization. So that i can use the drawn surface for further processing.

I think we have to use eglCreatePixmapsurface(), but i am not sure about its usage. Kindly help?

1

There are 1 answers

0
ClayMontgomery On

Most platforms have no support for pixmaps whatsoever. You may be able to create one with your EGL, but if your OS does not know what it is, it is useless.

On Android, off-screen surfaces must be created as explained here.

FBOs are the best solution on most platforms, but FBOs are really for further processing with OpenGL ES. Reading the image back typically requires using glReadPixels() which is very slow on most platforms.

I have a collection of articles here that show how to use FBOs on some platforms.