The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

can framebuffer object used without egl initialization?

I'm a newcomer to the opengl programming. I want to use opengles 2.0 to do some post-processing of images. I find that the FBO seems to be a good choice. My question is how can I use the FBO and should I use the EGL API to create a display,context,surface before that? I found that I cannot use glGetIntegerv or glGenFramebuffer until a window/pbuffer surfface is created. Is there any better ways to do the same thing?

Re: can framebuffer object used without egl initialization?

Even I am looking for an answer for the exactly same problem. I think you need to create EGLContext as it is necessary for maintaining the OpenGL ES state (hope I am not wrong here), but I am not sure if creating pBuffer surface is required as you are planning to render onto a FBO object. However, if you don't create pBuffer surface, then I am not sure what needs to be passed as argument to eglMakeCurrent!

Re: can framebuffer object used without egl initialization?

Hi,

i use the context without showing any surface on the screen. Im using iOS so i don't know if this is available on your platform, but maybe it helps you. It's necessary to create a rectangle where the OpenGL ES context can render the images. But i don't use it from the main screen. I think you only search for a rendering solution without showing the image on the screen?

My solution for this:

I've created a OpenGLESManager which holds the context.
The initialization looks like the following code sniped:

After this i can use the opengl methods and rendering stuff. But i don't need to show it on the screen.

For the context maybe it helps you to understand. The OpenGL ES Api is developed like a client server structure. And with the creating of the context you can set some messages or stats to the server. (<- This is from a OpenGL ES book and it helps me to understand the stuff of the OpenGL ES)