FramebuffersGL 3.0
glGenFramebuffers
Reserves names for new framebuffer objects (off-screen render targets).
Part of the family glGen*
Signature
void glGenFramebuffers(GLsizei n, GLuint *ids);
How it works
By default you draw into the window's framebuffer (ID 0). A framebuffer object (FBO) lets you draw into textures instead — the basis of post-processing, shadow maps, reflections and deferred shading.
An FBO owns no memory itself; it is a list of attachments (textures or renderbuffers) that you plug in.
Parameters
nGLsizei
How many IDs.
idsGLuint *
Array receiving the IDs.
Example
example.cpp
1GLuint fbo;
2glGenFramebuffers(1, &fbo);
3glBindFramebuffer(GL_FRAMEBUFFER, fbo);