logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glBindFramebuffer - bind a framebuffer to a framebuffer target

C Specification

voidglBindFramebuffer(GLenumtarget,GLuintframebuffer);

Description

glBindFramebuffer binds the framebuffer object with name framebuffer to the framebuffer target specified
       by target.  target must be either GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER. If a
       framebuffer object is bound to GL_DRAW_FRAMEBUFFER or GL_READ_FRAMEBUFFER, it becomes the target for
       rendering or readback operations, respectively, until it is deleted or another framebuffer is bound to
       the corresponding bind point. Calling glBindFramebuffer with target set to GL_FRAMEBUFFER binds
       framebuffer to both the read and draw framebuffer targets.  framebuffer is the name of a framebuffer
       object previously returned from a call to glGenFramebuffers(), or zero to break the existing binding of a
       framebuffer object to target.

Errors

GL_INVALID_ENUM is generated if target is not GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER.

       GL_INVALID_OPERATION is generated if framebuffer is not zero or the name of a framebuffer previously
       returned from a call to glGenFramebuffers().

Name

       glBindFramebuffer - bind a framebuffer to a framebuffer target

Parameters

target
           Specifies the framebuffer target of the binding operation.

       framebuffer
           Specifies the name of the framebuffer object to bind.

See Also

glGenFramebuffers(), glFramebufferRenderbuffer(), glFramebufferTexture(),

       glFramebufferTexture1D,

       glFramebufferTexture2D,

       glFramebufferTexture3D, glFramebufferTextureLayer(), glDeleteFramebuffers(), glIsFramebuffer()

Version Support

       ┌───────────────────┬───────────────────────────────────────────────────────────────────────┐
       │                   │                OpenGLVersion                                         │
       ├───────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │ Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │ /                 │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Feature           │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Name              │     │     │     │     │     │     │     │     │     │     │     │     │
       ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glBindFramebuffer │  -  │  -  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
       └───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

See Also