summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-20 15:19:45 -0700
committerBrian Paul <brianp@vmware.com>2009-01-22 15:18:24 -0700
commit515c118a7e6dfab39935cb4159824a715b45ed3a (patch)
tree626702f4d485ea5df5250d016ed70b46e1338c2f /src
parent4fc16fb7e9b72c4535967804c031256637a97197 (diff)
mesa: added GL_MAX_SAMPLES query for GL_ARB_fbo
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/get.c12
-rw-r--r--src/mesa/main/get_gen.py6
2 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 8ce9b0ae69..a5909913c8 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1905,6 +1905,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
CHECK_EXT1(ARB_shader_objects, "GetBooleanv");
params[0] = INT_TO_BOOLEAN(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
break;
+ case GL_MAX_SAMPLES:
+ CHECK_EXT1(ARB_framebuffer_object, "GetBooleanv");
+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxSamples);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
}
@@ -3753,6 +3757,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
CHECK_EXT1(ARB_shader_objects, "GetFloatv");
params[0] = (GLfloat)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
break;
+ case GL_MAX_SAMPLES:
+ CHECK_EXT1(ARB_framebuffer_object, "GetFloatv");
+ params[0] = (GLfloat)(ctx->Const.MaxSamples);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
}
@@ -5601,6 +5609,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
CHECK_EXT1(ARB_shader_objects, "GetIntegerv");
params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
break;
+ case GL_MAX_SAMPLES:
+ CHECK_EXT1(ARB_framebuffer_object, "GetIntegerv");
+ params[0] = ctx->Const.MaxSamples;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
}
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index a191b045d3..4bdbfed0bf 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -1009,7 +1009,11 @@ StateVars = [
# close enough for now.
( "GL_CURRENT_PROGRAM", GLint,
["ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0"],
- "", ["ARB_shader_objects"] )
+ "", ["ARB_shader_objects"] ),
+
+ # GL_ARB_framebuffer_object
+ ( "GL_MAX_SAMPLES", GLint, ["ctx->Const.MaxSamples"], "",
+ ["ARB_framebuffer_object"] )
]