Graphics Reference
In-Depth Information
Framebuffer Objects Versus EGL Surfaces
The differences between an FBO and the window system-provided
drawable surface are as follows:
• Pixel ownership test determines whether the pixel at location ( x w , y w )
in the framebuffer is currently owned by OpenGL ES. This test allows
the window system to control which pixels in the framebuffer belong
to the current OpenGL ES context—for example, when a window that
is being rendered into by OpenGL ES is obscured. For an application-
created framebuffer object, the pixel ownership test always succeeds,
as the framebuffer object owns all the pixels.
• The window system might support only double-buffered surfaces.
Framebuffer objects, in contrast, support only single-buffered
attachments.
• Sharing of stencil and depth buffers between framebuffers is
possible using framebuffer objects but usually not with the window
system-provided framebuffer. Stencil and depth buffers and their
corresponding state are usually allocated implicitly with the window
system-provided drawable surface and, therefore, cannot be shared
between drawable surfaces. With application-created framebuffer
objects, stencil and depth renderbuffers can be created independently
and then associated with a framebuffer object by attaching these
buffers to appropriate attachment points in multiple framebuffer
objects, if desired.
Creating Framebuffer and Renderbuffer Objects
Creating framebuffer and renderbuffer objects is similar to how texture or
vertex buffer objects are created in OpenGL ES 3.0.
The glGenRenderbuffers API call is used to allocate renderbuffer object
names. This API is described next.
void glGenRenderbuffers (GLsizei n , GLuint * renderbuffers )
n
number of renderbuffer object names to return
pointer to an array of n entries, where the allocated
renderbuffer object names are returned
renderbuffers
 
 
 
 
Search WWH ::




Custom Search