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

glFramebufferParameteri, glNamedFramebufferParameteri - set a named parameter of a framebuffer object

Associated Gets

glGetFramebufferParameteriv.

C Specification

voidglFramebufferParameteri(GLenumtarget,GLenumpname,GLintparam);voidglNamedFramebufferParameteri(GLuintframebuffer,GLenumpname,GLintparam);

Description

glFramebufferParameteri and glNamedFramebufferParameteri modify the value of the parameter named pname in
       the specified framebuffer object. There are no modifiable parameters of the default draw and read
       framebuffer, so they are not valid targets of these commands.

       For glFramebufferParameteri, the framebuffer object is that bound to target, which must be
       GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER.  GL_FRAMEBUFFER is equivalent to
       GL_DRAW_FRAMEBUFFER.

       For glNamedFramebufferParameteri, framebuffer is the name of the framebuffer object.

       pname specifies the parameter to be modified. The following values are accepted:

       GL_FRAMEBUFFER_DEFAULT_WIDTHparam specifies the assumed with for a framebuffer object with no attachments. If a framebuffer has
           attachments then the width of those attachments is used, otherwise the value of
           GL_FRAMEBUFFER_DEFAULT_WIDTH is used for the framebuffer.  param must be greater than or equal to
           zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_WIDTH.

       GL_FRAMEBUFFER_DEFAULT_HEIGHTparam specifies the assumed height for a framebuffer object with no attachments. If a framebuffer has
           attachments then the height of those attachments is used, otherwise the value of
           GL_FRAMEBUFFER_DEFAULT_HEIGHT is used for the framebuffer.  param must be greater than or equal to
           zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_HEIGHT.

       GL_FRAMEBUFFER_DEFAULT_LAYERSparam specifies the assumed number of layers for a framebuffer object with no attachments. If a
           framebuffer has attachments then the layer count of those attachments is used, otherwise the value of
           GL_FRAMEBUFFER_DEFAULT_LAYERS is used for the framebuffer.  param must be greater than or equal to
           zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_LAYERS.

       GL_FRAMEBUFFER_DEFAULT_SAMPLESparam specifies the assumed number of samples in a framebuffer object with no attachments. If a
           framebuffer has attachments then the sample count of those attachments is used, otherwise the value
           of GL_FRAMEBUFFER_DEFAULT_SAMPLES is used for the framebuffer.  param must be greater than or equal
           to zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_SAMPLE.

       GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONSparam specifies whether the framebuffer should assume identical sample locations and the same number
           of samples for all texels in the virtual image. If param is zero, then the implementation may vary
           the position or the count of samples within the virtual image from pixel to pixel, otherwise it will
           use the same sample position and count for all pixels in the virtual image.

Errors

GL_INVALID_ENUM is generated by glFramebufferParameteri if target is not one of the accepted framebuffer
       targets.

       GL_INVALID_OPERATION is generated by glFramebufferParameteri if the default framebuffer is bound to
       target.

       GL_INVALID_OPERATION is generated by glNamedFramebufferParameteri if framebuffer is not the name of an
       existing framebuffer object.

       GL_INVALID_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_WIDTH and param is less than zero or
       greater than the value of GL_MAX_FRAMEBUFFER_WIDTH.

       GL_INVALID_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_HEIGHT and param is less than zero or
       greater than the value of GL_MAX_FRAMEBUFFER_HEIGHT.

       GL_INVALID_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_LAYERS and param is less than zero or
       greater than the value of GL_MAX_FRAMEBUFFER_LAYERS.

       GL_INVALID_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_SAMPLES and param is less than zero or
       greater than the value of GL_MAX_FRAMEBUFFER_SAMPLES.

Name

       glFramebufferParameteri, glNamedFramebufferParameteri - set a named parameter of a framebuffer object

Parameters

target
           Specifies the target to which the framebuffer is bound for glFramebufferParameteri.

       framebuffer
           Specifies the name of the framebuffer object for glNamedFramebufferParameteri.

       pname
           Specifies the framebuffer parameter to be modified.

       param
           The new value for the parameter named pname.

See Also

glBindFramebuffer(), glCreateFramebuffers(), glFramebufferRenderbuffer(), glFramebufferTexture(),
       glGenFramebuffers(), glGetFramebufferParameter()

Version Support

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

See Also