1

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?

CoolToshi45
  • 155
  • 2
  • 10
  • Have you tried reading about the FBO (frame buffer object)? Basically all you do is create a frame buffer, attach a render buffer (or rather a texture) and then draw to it as you would to a normal (main) frame buffer. Then you can use this texture as any other. – Matic Oblak Dec 16 '14 at 14:45
  • possible duplicate of [Open GL ES creating Off-screen](http://stackoverflow.com/questions/27498930/open-gl-es-creating-off-screen) – Reto Koradi Dec 16 '14 at 16:31

1 Answers1

0

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.

Community
  • 1
  • 1
ClayMontgomery
  • 2,786
  • 1
  • 15
  • 14