summaryrefslogtreecommitdiff
path: root/src/mesa/main/getstring.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-30 10:30:16 -0700
committerBrian Paul <brianp@vmware.com>2009-12-30 10:30:23 -0700
commit16e91d4c0e1088f5c4098b01b4b7bf670cd66c4a (patch)
tree683f17d168f4ca591bd7846ea7fb365db42cbcb9 /src/mesa/main/getstring.c
parent56bdaca03e2289f56d1c88668d0a0f1dbd5abeca (diff)
mesa: implement _mesa_GetStringi() for GL3
Note: not plugged into the dispatch table yet.
Diffstat (limited to 'src/mesa/main/getstring.c')
-rw-r--r--src/mesa/main/getstring.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 6599ed9698..cac5eef1cb 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -184,6 +184,34 @@ _mesa_GetString( GLenum name )
/**
+ * GL3
+ */
+const GLubyte * GLAPIENTRY
+_mesa_GetStringi(GLenum name, GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx)
+ return NULL;
+
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
+
+ switch (name) {
+ case GL_EXTENSIONS:
+ if (index >= _mesa_get_extension_count(ctx)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetStringi(index=%u)", index);
+ return (const GLubyte *) 0;
+ }
+ return _mesa_get_enabled_extension(ctx, index);
+ default:
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" );
+ return (const GLubyte *) 0;
+ }
+}
+
+
+
+/**
* Return pointer-valued state, such as a vertex array pointer.
*
* \param pname names state to be queried