mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 07:30:22 +01:00
mesa: add new ColorEncoding and ComponentType to gl_renderbuffer
This commit is contained in:
parent
06f3b2e679
commit
d9a2cf9246
2 changed files with 11 additions and 2 deletions
|
|
@ -2260,7 +2260,9 @@ struct gl_renderbuffer
|
|||
GLenum _ActualFormat; /**< The driver-chosen format */
|
||||
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
|
||||
GL_STENCIL_INDEX. */
|
||||
GLenum DataType; /**< Type of values passed to the Get/Put functions */
|
||||
GLenum ColorEncoding; /**< GL_LINEAR or GL_SRGB */
|
||||
GLenum ComponentType; /**< GL_FLOAT, GL_INT, GL_UNSIGNED_INT,
|
||||
GL_UNSIGNED_NORMALIZED or GL_INDEX */
|
||||
GLubyte RedBits; /**< Bits of red per pixel */
|
||||
GLubyte GreenBits;
|
||||
GLubyte BlueBits;
|
||||
|
|
@ -2268,6 +2270,8 @@ struct gl_renderbuffer
|
|||
GLubyte IndexBits;
|
||||
GLubyte DepthBits;
|
||||
GLubyte StencilBits;
|
||||
|
||||
GLenum DataType; /**< Type of values passed to the Get/Put functions */
|
||||
GLvoid *Data; /**< This may not be used by some kinds of RBs */
|
||||
|
||||
/* Used to wrap one renderbuffer around another: */
|
||||
|
|
|
|||
|
|
@ -1487,11 +1487,16 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
|
|||
rb->InternalFormat = GL_NONE;
|
||||
rb->_ActualFormat = GL_NONE;
|
||||
rb->_BaseFormat = GL_NONE;
|
||||
rb->DataType = GL_NONE;
|
||||
|
||||
rb->ComponentType = GL_UNSIGNED_NORMALIZED; /* ARB_fbo */
|
||||
rb->ColorEncoding = GL_LINEAR; /* ARB_fbo */
|
||||
|
||||
rb->RedBits = rb->GreenBits = rb->BlueBits = rb->AlphaBits = 0;
|
||||
rb->IndexBits = 0;
|
||||
rb->DepthBits = 0;
|
||||
rb->StencilBits = 0;
|
||||
|
||||
rb->DataType = GL_NONE;
|
||||
rb->Data = NULL;
|
||||
|
||||
/* Point back to ourself so that we don't have to check for Wrapped==NULL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue