diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/attrib.c | 3 | ||||
-rw-r--r-- | src/mesa/main/dlist.c | 93 | ||||
-rw-r--r-- | src/mesa/main/enable.c | 28 | ||||
-rw-r--r-- | src/mesa/main/extensions.c | 4 | ||||
-rw-r--r-- | src/mesa/main/get.c | 60 | ||||
-rw-r--r-- | src/mesa/main/get_gen.py | 34 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 6 | ||||
-rw-r--r-- | src/mesa/main/pixel.c | 5 | ||||
-rw-r--r-- | src/mesa/main/state.c | 15 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 132 | ||||
-rw-r--r-- | src/mesa/main/texstate.h | 44 |
11 files changed, 3 insertions, 421 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index b4a587efb0..41119f7937 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -179,7 +179,6 @@ _mesa_PushAttrib(GLbitfield mask) MEMCPY(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); attr->Normalize = ctx->Transform.Normalize; attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped; - attr->PixelTexture = ctx->Pixel.PixelTextureEnabled; attr->PointSmooth = ctx->Point.SmoothFlag; attr->PointSprite = ctx->Point.PointSprite; attr->PolygonOffsetPoint = ctx->Polygon.OffsetPoint; @@ -499,8 +498,6 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable) TEST_AND_UPDATE(ctx->Transform.RasterPositionUnclipped, enable->RasterPositionUnclipped, GL_RASTER_POSITION_UNCLIPPED_IBM); - TEST_AND_UPDATE(ctx->Pixel.PixelTextureEnabled, enable->PixelTexture, - GL_POINT_SMOOTH); TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth, GL_POINT_SMOOTH); if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite) { diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 0ce0e095a9..8a0ac0fa4a 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -285,9 +285,6 @@ typedef enum { OPCODE_WINDOW_POS, /* GL_ARB_multitexture */ OPCODE_ACTIVE_TEXTURE, - /* GL_SGIX/SGIS_pixel_texture */ - OPCODE_PIXEL_TEXGEN_SGIX, - OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS, /* GL_ARB_texture_compression */ OPCODE_COMPRESSED_TEX_IMAGE_1D, OPCODE_COMPRESSED_TEX_IMAGE_2D, @@ -769,9 +766,6 @@ _mesa_init_lists( void ) InstSize[OPCODE_CONTINUE] = 2; InstSize[OPCODE_ERROR] = 3; InstSize[OPCODE_END_OF_LIST] = 1; - /* GL_SGIX/SGIS_pixel_texture */ - InstSize[OPCODE_PIXEL_TEXGEN_SGIX] = 2; - InstSize[OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS] = 3; /* GL_ARB_texture_compression */ InstSize[OPCODE_COMPRESSED_TEX_IMAGE_1D] = 8; InstSize[OPCODE_COMPRESSED_TEX_IMAGE_2D] = 9; @@ -3943,22 +3937,6 @@ save_MultTransposeMatrixfARB( const GLfloat m[16] ) } -static void GLAPIENTRY -save_PixelTexGenSGIX(GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_SGIX, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - CALL_PixelTexGenSGIX(ctx->Exec, ( mode )); - } -} - - /* GL_ARB_texture_compression */ static void GLAPIENTRY save_CompressedTexImage1DARB(GLenum target, GLint level, @@ -4235,46 +4213,6 @@ save_SampleCoverageARB(GLclampf value, GLboolean invert) } -/* GL_SGIS_pixel_texture */ - -static void GLAPIENTRY -save_PixelTexGenParameteriSGIS(GLenum target, GLint value) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS, 2 ); - if (n) { - n[1].e = target; - n[2].i = value; - } - if (ctx->ExecuteFlag) { - CALL_PixelTexGenParameteriSGIS(ctx->Exec, ( target, value )); - } -} - - -static void GLAPIENTRY -save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value) -{ - save_PixelTexGenParameteriSGIS(target, (GLint) value); -} - - -static void GLAPIENTRY -save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value) -{ - save_PixelTexGenParameteriSGIS(target, *value); -} - - -static void GLAPIENTRY -save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) -{ - save_PixelTexGenParameteriSGIS(target, (GLint) *value); -} - - /* * GL_NV_vertex_program */ @@ -6268,12 +6206,6 @@ execute_list( GLcontext *ctx, GLuint list ) case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */ CALL_ActiveTextureARB(ctx->Exec, ( n[1].e )); break; - case OPCODE_PIXEL_TEXGEN_SGIX: /* GL_SGIX_pixel_texture */ - CALL_PixelTexGenSGIX(ctx->Exec, ( n[1].e )); - break; - case OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS: /* GL_SGIS_pixel_texture */ - CALL_PixelTexGenParameteriSGIS(ctx->Exec, ( n[1].e, n[2].i )); - break; case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */ CALL_CompressedTexImage1DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e, n[4].i, n[5].i, n[6].i, n[7].data)); @@ -7346,20 +7278,6 @@ static void GLAPIENTRY exec_SeparableFilter2D(GLenum target, GLenum internalForm type, row, column)); } -static void GLAPIENTRY exec_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_GetPixelTexGenParameterivSGIS(ctx->Exec, ( target, value)); -} - -static void GLAPIENTRY exec_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_GetPixelTexGenParameterfvSGIS(ctx->Exec, ( target, value)); -} - static void GLAPIENTRY exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr) { @@ -7784,17 +7702,6 @@ _mesa_init_dlist_table( struct _glapi_table *table ) SET_TexSubImage3DEXT(table, save_TexSubImage3D); #endif - /* 15. GL_SGIX_pixel_texture */ - SET_PixelTexGenSGIX(table, save_PixelTexGenSGIX); - - /* 15. GL_SGIS_pixel_texture */ - SET_PixelTexGenParameteriSGIS(table, save_PixelTexGenParameteriSGIS); - SET_PixelTexGenParameterfSGIS(table, save_PixelTexGenParameterfSGIS); - SET_PixelTexGenParameterivSGIS(table, save_PixelTexGenParameterivSGIS); - SET_PixelTexGenParameterfvSGIS(table, save_PixelTexGenParameterfvSGIS); - SET_GetPixelTexGenParameterivSGIS(table, exec_GetPixelTexGenParameterivSGIS); - SET_GetPixelTexGenParameterfvSGIS(table, exec_GetPixelTexGenParameterfvSGIS); - /* 30. GL_EXT_vertex_array */ SET_ColorPointerEXT(table, exec_ColorPointerEXT); SET_EdgeFlagPointerEXT(table, exec_EdgeFlagPointerEXT); diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 7ce13a1967..931aa2cc26 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -687,24 +687,6 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) client_state( ctx, cap, state ); return; - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION(SGIS_pixel_texture, cap); - if (ctx->Pixel.PixelTextureEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PixelTextureEnabled = state; - break; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION(SGIX_pixel_texture, cap); - if (ctx->Pixel.PixelTextureEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PixelTextureEnabled = state; - break; - /* GL_SGI_color_table */ case GL_COLOR_TABLE_SGI: CHECK_EXTENSION(SGI_color_table, cap); @@ -1242,16 +1224,6 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(EXT_histogram); return ctx->Pixel.MinMaxEnabled; - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION(SGIS_pixel_texture); - return ctx->Pixel.PixelTextureEnabled; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION(SGIX_pixel_texture); - return ctx->Pixel.PixelTextureEnabled; - /* GL_SGI_color_table */ case GL_COLOR_TABLE_SGI: CHECK_EXTENSION(SGI_color_table); diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 816fca9957..b56cf539d0 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -155,12 +155,10 @@ static const struct { { OFF, "GL_SGI_color_table", F(SGI_color_table) }, { OFF, "GL_SGI_texture_color_table", F(SGI_texture_color_table) }, { OFF, "GL_SGIS_generate_mipmap", F(SGIS_generate_mipmap) }, - { OFF, "GL_SGIS_pixel_texture", F(SGIS_pixel_texture) }, { OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) }, { ON, "GL_SGIS_texture_edge_clamp", F(SGIS_texture_edge_clamp) }, { ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) }, { OFF, "GL_SGIX_depth_texture", F(SGIX_depth_texture) }, - { OFF, "GL_SGIX_pixel_texture", F(SGIX_pixel_texture) }, { OFF, "GL_SGIX_shadow", F(SGIX_shadow) }, { OFF, "GL_SGIX_shadow_ambient", F(SGIX_shadow_ambient) }, { OFF, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) }, @@ -274,10 +272,8 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.SGI_color_table = GL_TRUE; ctx->Extensions.SGI_texture_color_table = GL_TRUE; ctx->Extensions.SGIS_generate_mipmap = GL_TRUE; - ctx->Extensions.SGIS_pixel_texture = GL_TRUE; ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE; ctx->Extensions.SGIX_depth_texture = GL_TRUE; - ctx->Extensions.SGIX_pixel_texture = GL_TRUE; ctx->Extensions.SGIX_shadow = GL_TRUE; ctx->Extensions.SGIX_shadow_ambient = GL_TRUE; } diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 9bbc29e346..3363f311e1 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -53,30 +53,6 @@ CHECK1(EXTNAME, "Float", PNAME ) -/** - * Helper routine. - */ -static GLenum -pixel_texgen_mode(const GLcontext *ctx) -{ - if (ctx->Pixel.FragmentRgbSource == GL_CURRENT_RASTER_POSITION) { - if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) { - return GL_RGBA; - } - else { - return GL_RGB; - } - } - else { - if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) { - return GL_ALPHA; - } - else { - return GL_NONE; - } - } -} - void GLAPIENTRY _mesa_GetBooleanv( GLenum pname, GLboolean *params ) { @@ -1183,18 +1159,6 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[15] = FLOAT_TO_BOOLEAN(matrix[15]); } break; - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION_B(SGIS_pixel_texture, pname); - params[0] = ctx->Pixel.PixelTextureEnabled; - break; - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION_B(SGIX_pixel_texture, pname); - params[0] = ctx->Pixel.PixelTextureEnabled; - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - CHECK_EXTENSION_B(SGIX_pixel_texture, pname); - params[0] = ENUM_TO_BOOLEAN(pixel_texgen_mode(ctx)); - break; case GL_COLOR_MATRIX_SGI: { const GLfloat *matrix = ctx->ColorMatrixStack.Top->m; @@ -3013,18 +2977,6 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[15] = matrix[15]; } break; - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION_F(SGIS_pixel_texture, pname); - params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PixelTextureEnabled); - break; - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION_F(SGIX_pixel_texture, pname); - params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PixelTextureEnabled); - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - CHECK_EXTENSION_F(SGIX_pixel_texture, pname); - params[0] = ENUM_TO_FLOAT(pixel_texgen_mode(ctx)); - break; case GL_COLOR_MATRIX_SGI: { const GLfloat *matrix = ctx->ColorMatrixStack.Top->m; @@ -4843,18 +4795,6 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[15] = IROUND(matrix[15]); } break; - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION_I(SGIS_pixel_texture, pname); - params[0] = BOOLEAN_TO_INT(ctx->Pixel.PixelTextureEnabled); - break; - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION_I(SGIX_pixel_texture, pname); - params[0] = BOOLEAN_TO_INT(ctx->Pixel.PixelTextureEnabled); - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - CHECK_EXTENSION_I(SGIX_pixel_texture, pname); - params[0] = ENUM_TO_INT(pixel_texgen_mode(ctx)); - break; case GL_COLOR_MATRIX_SGI: { const GLfloat *matrix = ctx->ColorMatrixStack.Top->m; diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index c22dda9f18..1940b4d6c6 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -558,16 +558,6 @@ StateVars = [ "matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"], "const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;", None ), - # GL_SGIS_pixel_texture - ( "GL_PIXEL_TEXTURE_SGIS", GLboolean, ["ctx->Pixel.PixelTextureEnabled"], - "", "SGIS_pixel_texture" ), - - # GL_SGIX_pixel_texture - ( "GL_PIXEL_TEX_GEN_SGIX", GLboolean, ["ctx->Pixel.PixelTextureEnabled"], - "", "SGIX_pixel_texture" ), - ( "GL_PIXEL_TEX_GEN_MODE_SGIX", GLenum, ["pixel_texgen_mode(ctx)"], - "", "SGIX_pixel_texture" ), - # GL_SGI_color_matrix (also in 1.2 imaging) ( "GL_COLOR_MATRIX_SGI", GLfloat, ["matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]", @@ -1119,30 +1109,6 @@ def EmitHeader(): #define CHECK_EXTENSION_F(EXTNAME, PNAME) \\ CHECK1(EXTNAME, "Float", PNAME ) - -/** - * Helper routine. - */ -static GLenum -pixel_texgen_mode(const GLcontext *ctx) -{ - if (ctx->Pixel.FragmentRgbSource == GL_CURRENT_RASTER_POSITION) { - if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) { - return GL_RGBA; - } - else { - return GL_RGB; - } - } - else { - if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) { - return GL_ALPHA; - } - else { - return GL_NONE; - } - } -} """ return diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 81f10cb1f7..87e13f5e62 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -941,10 +941,6 @@ struct gl_pixel_attrib /** GL_EXT_histogram */ GLboolean HistogramEnabled; GLboolean MinMaxEnabled; - /** GL_SGIS_pixel_texture */ - GLboolean PixelTextureEnabled; - GLenum FragmentRgbSource; - GLenum FragmentAlphaSource; /** GL_SGI_color_matrix */ GLfloat PostColorMatrixScale[4]; /**< RGBA */ GLfloat PostColorMatrixBias[4]; /**< RGBA */ @@ -2381,11 +2377,9 @@ struct gl_extensions GLboolean SGI_color_table; GLboolean SGI_texture_color_table; GLboolean SGIS_generate_mipmap; - GLboolean SGIS_pixel_texture; GLboolean SGIS_texture_edge_clamp; GLboolean SGIS_texture_lod; GLboolean SGIX_depth_texture; - GLboolean SGIX_pixel_texture; GLboolean SGIX_shadow; GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */ GLboolean TDFX_texture_compression_FXT1; diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index 14eca650b1..3b1f848e8c 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5 * * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * @@ -2038,9 +2038,6 @@ _mesa_init_pixel( GLcontext *ctx ) ctx->Pixel.MapAtoA[0] = 0.0; ctx->Pixel.HistogramEnabled = GL_FALSE; ctx->Pixel.MinMaxEnabled = GL_FALSE; - ctx->Pixel.PixelTextureEnabled = GL_FALSE; - ctx->Pixel.FragmentRgbSource = GL_PIXEL_GROUP_COLOR_SGIS; - ctx->Pixel.FragmentAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS; ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0); ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0); ASSIGN_4V(ctx->Pixel.ColorTableScale, 1.0, 1.0, 1.0, 1.0); diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 56cb358c4a..627b24cce0 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -419,21 +419,6 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv); #endif - /* ?. GL_SGIX_pixel_texture */ -#if _HAVE_FULL_GL - SET_PixelTexGenSGIX(exec, _mesa_PixelTexGenSGIX); -#endif - - /* 15. GL_SGIS_pixel_texture */ -#if _HAVE_FULL_GL - SET_PixelTexGenParameteriSGIS(exec, _mesa_PixelTexGenParameteriSGIS); - SET_PixelTexGenParameterivSGIS(exec, _mesa_PixelTexGenParameterivSGIS); - SET_PixelTexGenParameterfSGIS(exec, _mesa_PixelTexGenParameterfSGIS); - SET_PixelTexGenParameterfvSGIS(exec, _mesa_PixelTexGenParameterfvSGIS); - SET_GetPixelTexGenParameterivSGIS(exec, _mesa_GetPixelTexGenParameterivSGIS); - SET_GetPixelTexGenParameterfvSGIS(exec, _mesa_GetPixelTexGenParameterfvSGIS); -#endif - /* 30. GL_EXT_vertex_array */ #if _HAVE_FULL_GL SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT); diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index b352d1a5ad..608dbc1088 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2704,138 +2704,6 @@ _mesa_ClientActiveTextureARB( GLenum target ) /**********************************************************************/ -/* Pixel Texgen Extensions */ -/**********************************************************************/ - -void GLAPIENTRY -_mesa_PixelTexGenSGIX(GLenum mode) -{ - GLenum newRgbSource, newAlphaSource; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (mode) { - case GL_NONE: - newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS; - newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS; - break; - case GL_ALPHA: - newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS; - newAlphaSource = GL_CURRENT_RASTER_COLOR; - break; - case GL_RGB: - newRgbSource = GL_CURRENT_RASTER_COLOR; - newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS; - break; - case GL_RGBA: - newRgbSource = GL_CURRENT_RASTER_COLOR; - newAlphaSource = GL_CURRENT_RASTER_COLOR; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenSGIX(mode)"); - return; - } - - if (newRgbSource == ctx->Pixel.FragmentRgbSource && - newAlphaSource == ctx->Pixel.FragmentAlphaSource) - return; - - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.FragmentRgbSource = newRgbSource; - ctx->Pixel.FragmentAlphaSource = newAlphaSource; -} - - -void GLAPIENTRY -_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value) -{ - _mesa_PixelTexGenParameteriSGIS(target, (GLint) value); -} - - -void GLAPIENTRY -_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) -{ - _mesa_PixelTexGenParameteriSGIS(target, (GLint) *value); -} - - -void GLAPIENTRY -_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (value != GL_CURRENT_RASTER_COLOR && value != GL_PIXEL_GROUP_COLOR_SGIS) { - _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(value)"); - return; - } - - switch (target) { - case GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS: - if (ctx->Pixel.FragmentRgbSource == (GLenum) value) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.FragmentRgbSource = (GLenum) value; - break; - case GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS: - if (ctx->Pixel.FragmentAlphaSource == (GLenum) value) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.FragmentAlphaSource = (GLenum) value; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(target)"); - return; - } -} - - -void GLAPIENTRY -_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value) -{ - _mesa_PixelTexGenParameteriSGIS(target, *value); -} - - -void GLAPIENTRY -_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) { - *value = (GLfloat) ctx->Pixel.FragmentRgbSource; - } - else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) { - *value = (GLfloat) ctx->Pixel.FragmentAlphaSource; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterfvSGIS(target)"); - } -} - - -void GLAPIENTRY -_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) { - *value = (GLint) ctx->Pixel.FragmentRgbSource; - } - else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) { - *value = (GLint) ctx->Pixel.FragmentAlphaSource; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterivSGIS(target)"); - } -} - - - -/**********************************************************************/ /***** State management *****/ /**********************************************************************/ diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h index 7cc3d2c19c..ca29c6a23f 100644 --- a/src/mesa/main/texstate.h +++ b/src/mesa/main/texstate.h @@ -5,9 +5,9 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.5 * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -133,46 +133,6 @@ extern void GLAPIENTRY _mesa_ClientActiveTextureARB( GLenum target ); -/* - * Pixel Texture Extensions - */ - -extern void GLAPIENTRY -_mesa_PixelTexGenSGIX(GLenum mode); - -extern void GLAPIENTRY -_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value); - -#ifdef VMS -#define _mesa_PixelTexGenParameterfvSGIS _mesa_PixelTexGenParameterfv -#endif -extern void GLAPIENTRY -_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value); - -extern void GLAPIENTRY -_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value); - -#ifdef VMS -#define _mesa_PixelTexGenParameterivSGIS _mesa_PixelTexGenParameteriv -#endif -extern void GLAPIENTRY -_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value); - -#ifdef VMS -#define _mesa_GetPixelTexGenParameterfvSGIS _mesa_GetPixelTexGenParameterfv -#endif -extern void GLAPIENTRY -_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value); - -#ifdef VMS -#define _mesa_GetPixelTexGenParameterivSGIS _mesa_GetPixelTexGenParameteriv -#endif -extern void GLAPIENTRY -_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value); - -/*@}*/ - - /** * \name Initialization, state maintenance */ |