glGenRenderBuffers_______________
- glGenRenderbuffers — generate renderbuffer object names
C Specification
- void glGenRenderbuffers( GLsizei n,GLuint * renderbuffers);
Parameters
n- Specifies the number of renderbuffer object names to be generated.
renderbuffers
- Specifies an array in which the generated renderbuffer object names are stored.
Description
- glGenRenderbuffers returns n renderbuffer object names in renderbuffers.
- There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to glGenRenderbuffers.
- Renderbuffer object names returned by a call to glGenRenderbuffers are not returned by subsequent calls, unless they are first deleted with glDeleteRenderbuffers.
- No renderbuffer objects are associated with the returned renderbuffer object names until they are first bound by calling glBindRenderbuffer.
Errors
- GL_INVALID_VALUE is generated if n is negative.
glBindRenderBuffer___
- glBindRenderbuffer — bind a named renderbuffer object
C Specification
- void glBindRenderbuffer( GLenum target,GLuint renderbuffer);
Parameters
target- Specifies the target to which the renderbuffer object is bound.
- The symbolic constant must be GL_RENDERBUFFER.
renderbuffer
- Specifies the name of a renderbuffer object.
Description
- A renderbuffer is a data storage object containing a single image of a renderable internal format.
- A renderbuffer's image may be attached to a framebuffer object to use as a destination for rendering and as a source for reading.
- glBindRenderbuffer lets you create or use a named renderbuffer object.
- Calling glBindRenderbuffer with target set to GL_RENDERBUFFER and renderbuffer set to the name of the new renderbuffer object binds the renderbuffer object name. When a renderbuffer object is bound, the previous binding is automatically broken.
- Renderbuffer object names are unsigned integers.
- The value zero is reserved, but there is no default renderbuffer object. Instead, renderbuffer set to zero effectively unbinds any renderbuffer object previously bound.
- Renderbuffer object names and the corresponding renderbuffer object contents are local to the shared object space of the current GL rendering context.
- You may use glGenRenderbuffers to generate a set of new renderbuffer object names.
- The state of a renderbuffer object immediately after it is first bound is a zero-sized memory buffer with format GL_RGBA4 and zero-sized red, green, blue, alpha, depth, and stencil pixel depths.
- While a non-zero renderbuffer object name is bound, GL operations on target GL_RENDERBUFFER affect the bound renderbuffer object, and queries of target GL_RENDERBUFFER return state from the bound renderbuffer object. While renderbuffer object name zero is bound, as in the initial state, attempts to modify or query state on target GL_RENDERBUFFER generates an GL_INVALID_OPERATION error.
- A renderbuffer object binding created with glBindRenderbuffer remains active until a different renderbuffer object name is bound, or until the bound renderbuffer object is deleted with glDeleteRenderbuffers.
Errors
GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER.glDeleteRenderBuffers__________
- glDeleteRenderbuffers — delete named renderbuffer objects
C Specification
- void glDeleteRenderbuffers( GLsizei n,const GLuint * renderbuffers);
Parameters
n- Specifies the number of renderbuffer objects to be deleted.
renderbuffers
- Specifies an array of renderbuffer objects to be deleted.
Description
- glDeleteRenderbuffers deletes n renderbuffer objects named by the elements of the array renderbuffers.
- After a renderbuffer object is deleted, it has no contents, and its name is free for reuse (for example by glGenRenderbuffers).
- If a renderbuffer object that is currently bound is deleted, the binding reverts to 0 (the absence of any renderbuffer object).
- Additionally, special care must be taken when deleting a renderbuffer object if the image of the renderbuffer is attached to a framebuffer object. In this case, if the deleted renderbuffer object is attached to the currently bound framebuffer object, it is automatically detached.
- However, attachments to any other framebuffer objects are the responsibility of the application.
- glDeleteRenderbuffers silently ignores 0's and names that do not correspond to existing renderbuffer objects.
Errors
- GL_INVALID_VALUE is generated if n is negative.
...
...
No comments:
Post a Comment