Graphics Reference
In-Depth Information
associated with it and is marked as unused; it can then later be reused as
a new framebuffer object. When deleting a framebuffer object that is also
the currently bound framebuffer object, the framebuffer object is deleted
and the current framebuffer binding is reset to zero. If the framebuffer
object names specified in framebuffers are invalid or zero, they are
ignored and no error will be generated.
Deleting Renderbuffer Objects That Are Used
as Framebuffer Attachments
What happens if a renderbuffer object being deleted is used as an
attachment in a framebuffer object? If the renderbuffer object to be
deleted is used as an attachment in the currently bound framebuffer
object, glDeleteRenderbuffers will reset the attachment to zero. If the
renderbuffer object to be deleted is used as an attachment in framebuffer
objects that are not currently bound, then glDeleteRenderbuffers
will not reset these attachments to zero. It is the responsibility of the
application to detach these deleted renderbuffer objects from the
appropriate framebuffer objects.
Reading Pixels and Framebuffer Objects
The glReadPixels command reads pixels from the color buffer and returns
them in a user-allocated buffer. The color buffer that will be read from
is the color buffer allocated by the window system-provided framebuffer
or the color attachment of the currently bound framebuffer object. When
a non-zero buffer object is bound to GL_PIXEL_PACK_BUFFER using
glBindBuffer , the glReadPixels command can return immediately and
invoke DMA transfer to read pixels from the framebuffer and write the data
into the pixel buffer object.
Several combinations of format and type arguments in  glReadPixels
are supported: a format of GL_RGBA , GL_RGBA_INTEGER , or
implementation-specific values returned by querying
GL_IMPLEMENTATION_COLOR_READ_FORMAT ; and a type of
GL_UNSIGNED_BYTE , GL_UNSIGNED_INT , GL_INT , GL_FLOAT , or
implementation-specific values returned by querying
GL_IMPLEMENTATION_COLOR_READ_TYPE . The implementation-specific
format and type returned will depend on the format and type of the
currently attached color buffer. These values can change if the currently
bound framebuffer changes. They must be queried whenever the
currently bound framebuffer object changes to determine the correct
implementation-specific format and type values that must be passed to
glReadPixels .
 
 
Search WWH ::




Custom Search