FramebuffersGL 3.0
glGenRenderbuffers
Reserves names for renderbuffers — render-only images you never sample.
Part of the family glGen*
Signature
void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
How it works
A renderbuffer is like a texture that can only be rendered into, not sampled from. That restriction lets the driver store it in the fastest layout. The typical use is the depth/stencil attachment of a post-processing FBO: depth is needed while drawing, but never read afterwards.
Parameters
nGLsizei
How many IDs.
renderbuffersGLuint *
Array receiving the IDs.
Example
example.cpp
1GLuint rbo;
2glGenRenderbuffers(1, &rbo);