Does the iPhone OpenGL ES implementation supports PBuffer?
I looked around in the documentation and can’t find something like “eglCreatePbufferSurface”
If it does, can someone post sample code for its usage?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Pixel buffers are a platform-specific extension to OpenGL. In ES there’s no such extension because frame buffer objects are part of the core API. A frame buffer object can be used for complete off-screen rendering, usually to a texture, that is then used for some other task within the rendering pipeline. That’s how effects like depth-buffer shadowing and deferred rendering are achieved in OpenGL ES.
For example, to generate a frame buffer object with colour and depth buffers linked to textures you’ve already generated elsewhere you might do:
You’d use
glBindFramebufferto bind that frame buffer later on. You should then rebind the frame buffer that is linked to the display if you want to render something that is actually seen. You’ll have usedEAGLContext -renderbufferStorage:fromDrawable:somewhere to create a frame buffer object which uses a CAEAGLLayer as the storage for the colour buffer.Each individual thing that is linked to a frame buffer, such as storage for the colour buffer or storage for the depth buffer is called a render buffer. You can ask the driver to build those in whatever area it likes without linking to a texture via
glGenRenderbuffersandglRenderbufferStorage. So, for example, you can have just the colour buffer end up in a texture and leave the GPU to figure out storage for the depth buffer for itself if you like.