summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-10-02 16:39:09 +0000
committerBrian Paul <[email protected]>2004-10-02 16:39:09 +0000
commit53f82c5aadbb15585754bfacf3237093eccdb2ce (patch)
tree93c013f62d99caf8581c774f768cb7f365350095 /src/mesa/main/context.c
parent289ffee2a017308a9a97689662293613dc62d9e9 (diff)
added support for GL_ARB_draw_buffers
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 96c436971b1..44e3fcb9adc 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1050,7 +1050,7 @@ _mesa_init_constants( GLcontext *ctx )
assert(MAX_TEXTURE_LEVELS >= MAX_3D_TEXTURE_LEVELS);
assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS);
- /* Constants, may be overriden by device drivers */
+ /* Constants, may be overriden (usually only reduced) by device drivers */
ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS;
ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS;
ctx->Const.MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS;
@@ -1077,8 +1077,10 @@ _mesa_init_constants( GLcontext *ctx )
ctx->Const.MaxConvolutionHeight = MAX_CONVOLUTION_HEIGHT;
ctx->Const.MaxClipPlanes = MAX_CLIP_PLANES;
ctx->Const.MaxLights = MAX_LIGHTS;
- ctx->Const.MaxSpotExponent = 128.0;
ctx->Const.MaxShininess = 128.0;
+ ctx->Const.MaxSpotExponent = 128.0;
+ ctx->Const.MaxViewportWidth = MAX_WIDTH;
+ ctx->Const.MaxViewportHeight = MAX_HEIGHT;
#if FEATURE_ARB_vertex_program
ctx->Const.MaxVertexProgramInstructions = MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS;
ctx->Const.MaxVertexProgramAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
@@ -1110,6 +1112,9 @@ _mesa_init_constants( GLcontext *ctx )
ctx->Const.CheckArrayBounds = GL_FALSE;
#endif
+ ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS;
+
+ /* sanity checks */
ASSERT(ctx->Const.MaxTextureUnits == MAX2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits));
}