diff options
author | Dave Airlie <[email protected]> | 2011-01-17 09:45:26 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-01-21 19:56:13 +1000 |
commit | a637280e42b9a2f4ccbb5e7b209c5645073f584e (patch) | |
tree | 5082311f46087879ee02be2a8aead15b7af3d3f6 /src/mesa/main/enable.c | |
parent | 634e889bb5aee64ee17dcec221f4fb05ff93270d (diff) |
mesa: EXT_framebuffer_sRGB interface additions.
This adds the get/enable enums and internal gl_config storage
for this extension.
In theory this is all that is needed to enable this extension
from what I can see, since its not mandatory to implement the
features if you don't advertise the visuals or the fb configs.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index d047586eb35..c4c4e1bb29d 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -968,6 +968,12 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) } break; + /* GL3.0 - GL_framebuffer_sRGB */ + case GL_FRAMEBUFFER_SRGB_EXT: + CHECK_EXTENSION(EXT_framebuffer_sRGB, cap); + ctx->Color.sRGBEnabled = state; + break; + default: goto invalid_enum_error; } @@ -1480,6 +1486,11 @@ _mesa_IsEnabled( GLenum cap ) } return ctx->Array.PrimitiveRestart; + /* GL3.0 - GL_framebuffer_sRGB */ + case GL_FRAMEBUFFER_SRGB_EXT: + CHECK_EXTENSION(EXT_framebuffer_sRGB); + return ctx->Color.sRGBEnabled; + default: goto invalid_enum_error; } |