diff options
Diffstat (limited to 'xc/extras/Mesa/src/enable.c')
-rw-r--r-- | xc/extras/Mesa/src/enable.c | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/xc/extras/Mesa/src/enable.c b/xc/extras/Mesa/src/enable.c index de93fc03f..8c848d986 100644 --- a/xc/extras/Mesa/src/enable.c +++ b/xc/extras/Mesa/src/enable.c @@ -1,7 +1,7 @@ /* * Mesa 3-D graphics library - * Version: 4.0.2 + * Version: 4.0.4 * * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * @@ -792,7 +792,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Multisample.SampleCoverageInvert = state; break; - /* GL_IBM_rasterpos_clip */ + /* GL_IBM_rasterpos_clip */ case GL_RASTER_POSITION_UNCLIPPED_IBM: if (!ctx->Extensions.IBM_rasterpos_clip) { _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); @@ -804,21 +804,28 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Transform.RasterPositionUnclipped = state; break; - /* GL_MESA_sprite_point */ - case GL_SPRITE_POINT_MESA: - if (!ctx->Extensions.MESA_sprite_point) { - _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); - return; + /* GL_NV_texture_rectangle */ + case GL_TEXTURE_RECTANGLE_NV: + { + const GLuint curr = ctx->Texture.CurrentUnit; + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; + GLuint newenabled = texUnit->Enabled & ~TEXTURE0_RECT; + if (!ctx->Extensions.NV_texture_rectangle) { + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + return; + } + if (state) + newenabled |= TEXTURE0_RECT; + if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) + return; + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + texUnit->Enabled = newenabled; } - if (ctx->Point.SpriteMode == state) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.SpriteMode = state; break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); - return; + default: + _mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable"); + return; } if (ctx->Driver.Enable) { @@ -1116,9 +1123,17 @@ _mesa_IsEnabled( GLenum cap ) return GL_FALSE; } - /* GL_MESA_sprite_point */ - case GL_SPRITE_POINT_MESA: - return ctx->Point.SpriteMode; + /* GL_NV_texture_rectangle */ + case GL_TEXTURE_RECTANGLE_NV: + if (ctx->Extensions.NV_texture_rectangle) { + const struct gl_texture_unit *texUnit; + texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + return (texUnit->Enabled & TEXTURE0_RECT) ? GL_TRUE : GL_FALSE; + } + else { + _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); + return GL_FALSE; + } default: _mesa_error( ctx, GL_INVALID_ENUM, "glIsEnabled" ); |