Graphics Reference
In-Depth Information
glGenRenderbuffers
allocates
n
renderbuffer object names and returns
them in
renderbuffers
. The renderbuffer object names returned by
glGenRenderbuffers
are unsigned integer numbers other than 0. These
names returned are marked
in use
but do not have any state associated
with them. The value
0
is reserved by OpenGL ES and does not refer to
a renderbuffer object. Applications trying to modify or query the buffer
object state for renderbuffer object 0 will generate an appropriate error.
The
glGenFramebuffers
API call is used to allocate framebuffer object
names. This API is described here.
void
glGenFramebuffers
(GLsizei
n
, GLuint *
ids
)
number of framebuffer object names to return
n
pointer to an array of
n
entries, where allocated framebuffer
object are returned
ids
glGenFramebuffers
allocates
n
framebuffer object names and returns them
in
ids
. The framebuffer object names returned by
glGenFramebuffers
are
unsigned integer numbers other than 0. The framebuffer names returned are
marked
in use
but do not have any state associated with them. The value 0
is reserved by OpenGL ES and refers to the window system-provided
framebuffer. Applications trying to modify or query the buffer object state for
framebuffer object 0 will generate an appropriate error.
In this section, we describe how to specify the data storage, format, and
dimensions of the renderbuffer image. To specify this information for
a specific renderbuffer object, we need to make this object the current
renderbuffer object. The
glBindRenderbuffer
command is used to set
the current renderbuffer object.
void
glBindRenderbuffer
(GLenum
target
, GLuint
renderbuffer
)
target
must be set to
GL_RENDERBUFFER
renderbuffer object name
renderbuffer