summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-01-17 09:45:26 +1000
committerDave Airlie <[email protected]>2011-01-21 19:56:13 +1000
commita637280e42b9a2f4ccbb5e7b209c5645073f584e (patch)
tree5082311f46087879ee02be2a8aead15b7af3d3f6 /src/mesa/main/enable.c
parent634e889bb5aee64ee17dcec221f4fb05ff93270d (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.c11
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;
}