summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-02-28 16:28:11 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-02-28 16:28:11 +0000
commit683dba1164133554f511a4fa57b2c304a488b9dc (patch)
tree79d14ab7d647cfadd18f097fdbb559831fc3932b
parent4965446dbd9003dceaa729a5dd53e2104365367e (diff)
minimal support for GL_ATI_texture_env_combine3, merge with DRI trunk
-rw-r--r--include/GL/gl.h13
-rw-r--r--include/GL/glxext.h11
-rw-r--r--src/mesa/main/extensions.c7
-rw-r--r--src/mesa/main/imports.c39
-rw-r--r--src/mesa/main/imports.h12
-rw-r--r--src/mesa/main/mtypes.h7
-rw-r--r--src/mesa/main/texstate.c332
-rw-r--r--src/mesa/main/texstate.h9
8 files changed, 250 insertions, 180 deletions
diff --git a/include/GL/gl.h b/include/GL/gl.h
index 44254a77ff..3d75e09e55 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -1,10 +1,10 @@
-/* $Id: gl.h,v 1.72 2002/10/17 19:39:31 kschultz Exp $ */
+/* $Id: gl.h,v 1.72.2.1 2003/02/28 16:29:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.0.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 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"),
@@ -2646,6 +2646,13 @@ GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid
#endif /* GL_APPLE_ycbcr_422 */
+#ifndef GL_ATI_texture_env_combine3
+#define GL_ATI_texture_env_combine3 1
+#define GL_MODULATE_ADD_ATI 0x8744
+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
+#define GL_MODULATE_SUBTRACT_ATI 0x8746
+#endif
+
/**********************************************************************
* Begin system-specific stuff
diff --git a/include/GL/glxext.h b/include/GL/glxext.h
index 54620bd4e1..aa899546ad 100644
--- a/include/GL/glxext.h
+++ b/include/GL/glxext.h
@@ -260,6 +260,9 @@ extern "C" {
#ifndef GLX_MESA_release_buffers
#endif
+#ifndef GLX_MESA_agp_offset
+#endif
+
#ifndef GLX_MESA_set_3dfx_mode
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
@@ -568,6 +571,14 @@ extern Bool glXSet3DfxModeMESA (int);
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
#endif
+#ifndef GLX_MESA_agp_offset
+#define GLX_MESA_agp_offset 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLuint glXGetAGPOffsetMESA (const GLvoid *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLuint ( * PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *);
+#endif
+
#ifndef GLX_SGIX_visual_select_group
#define GLX_SGIX_visual_select_group 1
#endif
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index f387fb2c21..811593f93a 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -1,10 +1,10 @@
-/* $Id: extensions.c,v 1.85 2002/10/25 21:06:27 brianp Exp $ */
+/* $Id: extensions.c,v 1.85.2.1 2003/02/28 16:28:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.0.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 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"),
@@ -68,6 +68,7 @@ static struct {
{ OFF, "GL_ARB_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
{ ON, "GL_ARB_transpose_matrix", 0 },
{ ON, "GL_ARB_window_pos", F(ARB_window_pos) },
+ { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
{ OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
{ ON, "GL_EXT_abgr", 0 },
{ ON, "GL_EXT_bgra", 0 },
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 71ee71a764..9c3d16189c 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -1,8 +1,8 @@
-/* $Id: imports.c,v 1.25.2.1 2002/12/01 13:59:51 brianp Exp $ */
+/* $Id: imports.c,v 1.25.2.2 2003/02/28 16:28:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 5.0.1
+ * Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -356,6 +356,17 @@ _mesa_strncmp( const char *s1, const char *s2, size_t n )
}
+char *
+_mesa_strdup( const char *s )
+{
+ int l = _mesa_strlen(s);
+ char *s2 = (char *) _mesa_malloc(l + 1);
+ if (s2)
+ _mesa_strcpy(s2, s);
+ return s2;
+}
+
+
int
_mesa_atoi(const char *s)
{
@@ -367,6 +378,17 @@ _mesa_atoi(const char *s)
}
+double
+_mesa_strtod( const char *s, char **end )
+{
+#if defined(XFree86LOADER) && defined(IN_MODULE)
+ return xf86strtod(s, end);
+#else
+ return strtod(s, end);
+#endif
+}
+
+
int
_mesa_sprintf( char *str, const char *fmt, ... )
{
@@ -429,14 +451,21 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... )
* path which may not be implemented fully or correctly.
*/
void
-_mesa_problem( const GLcontext *ctx, const char *s )
+_mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
{
+ va_list args;
+ char str[MAXSTRING];
(void) ctx;
+
+ va_start( args, fmtString );
+ vsnprintf( str, MAXSTRING, fmtString, args );
+ va_end( args );
+
#if defined(XFree86LOADER) && defined(IN_MODULE)
- xf86fprintf(stderr, "Mesa implementation error: %s\n", s);
+ xf86fprintf(stderr, "Mesa implementation error: %s\n", str);
xf86fprintf(stderr, "Please report to the DRI project at dri.sourceforge.net\n");
#else
- fprintf(stderr, "Mesa implementation error: %s\n", s);
+ fprintf(stderr, "Mesa implementation error: %s\n", str);
fprintf(stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
#endif
}
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 5ec4229e32..7d6e545415 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -1,8 +1,8 @@
-/* $Id: imports.h,v 1.8.2.1 2003/01/14 02:57:30 brianp Exp $ */
+/* $Id: imports.h,v 1.8.2.2 2003/02/28 16:28:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 5.0
+ * Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -167,9 +167,15 @@ _mesa_strcmp( const char *s1, const char *s2 );
extern int
_mesa_strncmp( const char *s1, const char *s2, size_t n );
+extern char *
+_mesa_strdup( const char *s );
+
extern int
_mesa_atoi( const char *s );
+extern double
+_mesa_strtod( const char *s, char **end );
+
extern int
_mesa_sprintf( char *str, const char *fmt, ... );
@@ -181,7 +187,7 @@ extern void
_mesa_warning( __GLcontext *gc, const char *fmtString, ... );
extern void
-_mesa_problem( const __GLcontext *ctx, const char *s );
+_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... );
extern void
_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... );
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index fde7e3fab2..5e512f12b1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1,10 +1,10 @@
-/* $Id: mtypes.h,v 1.97 2002/10/21 15:52:34 brianp Exp $ */
+/* $Id: mtypes.h,v 1.97.2.1 2003/02/28 16:28:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.0.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 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"),
@@ -1367,6 +1367,7 @@ struct gl_extensions {
GLboolean ARB_texture_env_dot3;
GLboolean ARB_texture_mirrored_repeat;
GLboolean ARB_window_pos;
+ GLboolean ATI_texture_env_combine3;
GLboolean ATI_texture_mirror_once;
GLboolean EXT_blend_color;
GLboolean EXT_blend_func_separate;
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index ee22941b19..f305ae70c7 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.87.2.3 2003/01/21 23:57:52 brianp Exp $ */
+/* $Id: texstate.c,v 1.87.2.4 2003/02/28 16:28:22 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -116,6 +116,36 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
}
+/*
+ * For debugging
+ */
+void
+_mesa_print_texunit_state( GLcontext *ctx, GLuint unit )
+{
+ const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
+ _mesa_printf("Texture Unit %d\n", unit);
+ _mesa_printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode));
+ _mesa_printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineModeRGB));
+ _mesa_printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineModeA));
+ _mesa_printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[0]));
+ _mesa_printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[1]));
+ _mesa_printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[2]));
+ _mesa_printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[0]));
+ _mesa_printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[1]));
+ _mesa_printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[2]));
+ _mesa_printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[0]));
+ _mesa_printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[1]));
+ _mesa_printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[2]));
+ _mesa_printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[0]));
+ _mesa_printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[1]));
+ _mesa_printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[2]));
+ _mesa_printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->CombineScaleShiftRGB);
+ _mesa_printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->CombineScaleShiftA);
+ _mesa_printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]);
+}
+
+
+
/**********************************************************************/
/* Texture Environment */
/**********************************************************************/
@@ -141,7 +171,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
mode == GL_DECAL ||
mode == GL_REPLACE ||
(mode == GL_ADD && ctx->Extensions.EXT_texture_env_add) ||
- (mode == GL_COMBINE_EXT &&
+ (mode == GL_COMBINE &&
(ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine))) {
/* legal */
@@ -169,7 +199,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
COPY_4FV(texUnit->EnvColor, tmp);
}
break;
- case GL_COMBINE_RGB_EXT:
+ case GL_COMBINE_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
const GLenum mode = (GLenum) (GLint) *param;
@@ -177,11 +207,11 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
case GL_REPLACE:
case GL_MODULATE:
case GL_ADD:
- case GL_ADD_SIGNED_EXT:
- case GL_INTERPOLATE_EXT:
+ case GL_ADD_SIGNED:
+ case GL_INTERPOLATE:
/* OK */
break;
- case GL_SUBTRACT_ARB:
+ case GL_SUBTRACT:
if (!ctx->Extensions.ARB_texture_env_combine) {
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
return;
@@ -194,13 +224,21 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
break;
- case GL_DOT3_RGB_ARB:
- case GL_DOT3_RGBA_ARB:
+ case GL_DOT3_RGB:
+ case GL_DOT3_RGBA:
if (!ctx->Extensions.ARB_texture_env_dot3) {
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
return;
}
break;
+ case GL_MODULATE_ADD_ATI:
+ case GL_MODULATE_SIGNED_ADD_ATI:
+ case GL_MODULATE_SUBTRACT_ATI:
+ if (!ctx->Extensions.ATI_texture_env_combine3) {
+ TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
+ return;
+ }
+ break;
default:
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
return;
@@ -215,47 +253,63 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
break;
- case GL_COMBINE_ALPHA_EXT:
+ case GL_COMBINE_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
const GLenum mode = (GLenum) (GLint) *param;
- if (mode == GL_REPLACE ||
- mode == GL_MODULATE ||
- mode == GL_ADD ||
- mode == GL_ADD_SIGNED_EXT ||
- mode == GL_INTERPOLATE_EXT ||
- (mode == GL_SUBTRACT_ARB &&
- ctx->Extensions.ARB_texture_env_combine)) {
- /* legal */
- if (texUnit->CombineModeA == mode)
- return;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texUnit->CombineModeA = mode;
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
+ switch (mode) {
+ case GL_REPLACE:
+ case GL_MODULATE:
+ case GL_ADD:
+ case GL_ADD_SIGNED:
+ case GL_INTERPOLATE:
+ /* OK */
+ break;
+ case GL_SUBTRACT:
+ if (!ctx->Extensions.ARB_texture_env_combine) {
+ TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
+ return;
+ }
+ break;
+ case GL_MODULATE_ADD_ATI:
+ case GL_MODULATE_SIGNED_ADD_ATI:
+ case GL_MODULATE_SUBTRACT_ATI:
+ if (!ctx->Extensions.ATI_texture_env_combine3) {
+ TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
+ return;
+ }
+ break;
+ default:
+ TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode);
return;
}
+
+ if (texUnit->CombineModeA == mode)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ texUnit->CombineModeA = mode;
}
else {
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
return;
}
break;
- case GL_SOURCE0_RGB_EXT:
- case GL_SOURCE1_RGB_EXT:
- case GL_SOURCE2_RGB_EXT:
+ case GL_SOURCE0_RGB:
+ case GL_SOURCE1_RGB:
+ case GL_SOURCE2_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
const GLenum source = (GLenum) (GLint) *param;
- const GLuint s = pname - GL_SOURCE0_RGB_EXT;
+ const GLuint s = pname - GL_SOURCE0_RGB;
if (source == GL_TEXTURE ||
- source == GL_CONSTANT_EXT ||
- source == GL_PRIMARY_COLOR_EXT ||
- source == GL_PREVIOUS_EXT ||
+ source == GL_CONSTANT ||
+ source == GL_PRIMARY_COLOR ||
+ source == GL_PREVIOUS ||
(ctx->Extensions.ARB_texture_env_crossbar &&
- source >= GL_TEXTURE0_ARB &&
- source < GL_TEXTURE0_ARB + ctx->Const.MaxTextureUnits)) {
+ source >= GL_TEXTURE0 &&
+ source < GL_TEXTURE0 + ctx->Const.MaxTextureUnits) ||
+ (ctx->Extensions.ATI_texture_env_combine3 &&
+ (source == GL_ZERO || source == GL_ONE))) {
/* legal */
if (texUnit->CombineSourceRGB[s] == source)
return;
@@ -272,20 +326,22 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
break;
- case GL_SOURCE0_ALPHA_EXT:
- case GL_SOURCE1_ALPHA_EXT:
- case GL_SOURCE2_ALPHA_EXT:
+ case GL_SOURCE0_ALPHA:
+ case GL_SOURCE1_ALPHA:
+ case GL_SOURCE2_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
const GLenum source = (GLenum) (GLint) *param;
- const GLuint s = pname - GL_SOURCE0_ALPHA_EXT;
+ const GLuint s = pname - GL_SOURCE0_ALPHA;
if (source == GL_TEXTURE ||
- source == GL_CONSTANT_EXT ||
- source == GL_PRIMARY_COLOR_EXT ||
- source == GL_PREVIOUS_EXT ||
+ source == GL_CONSTANT ||
+ source == GL_PRIMARY_COLOR ||
+ source == GL_PREVIOUS ||
(ctx->Extensions.ARB_texture_env_crossbar &&
- source >= GL_TEXTURE0_ARB &&
- source < GL_TEXTURE0_ARB + ctx->Const.MaxTextureUnits)) {
+ source >= GL_TEXTURE0 &&
+ source < GL_TEXTURE0 + ctx->Const.MaxTextureUnits) ||
+ (ctx->Extensions.ATI_texture_env_combine3 &&
+ (source == GL_ZERO || source == GL_ONE))) {
/* legal */
if (texUnit->CombineSourceA[s] == source)
return;
@@ -302,12 +358,13 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
break;
- case GL_OPERAND0_RGB_EXT:
- case GL_OPERAND1_RGB_EXT:
+ case GL_OPERAND0_RGB:
+ case GL_OPERAND1_RGB:
+ case GL_OPERAND2_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
const GLenum operand = (GLenum) (GLint) *param;
- const GLuint s = pname - GL_OPERAND0_RGB_EXT;
+ const GLuint s = pname - GL_OPERAND0_RGB;
switch (operand) {
case GL_SRC_COLOR:
case GL_ONE_MINUS_SRC_COLOR:
@@ -328,65 +385,20 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
break;
- case GL_OPERAND0_ALPHA_EXT:
- case GL_OPERAND1_ALPHA_EXT:
+ case GL_OPERAND0_ALPHA:
+ case GL_OPERAND1_ALPHA:
+ case GL_OPERAND2_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
const GLenum operand = (GLenum) (GLint) *param;
switch (operand) {
case GL_SRC_ALPHA:
case GL_ONE_MINUS_SRC_ALPHA:
- if (texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA_EXT] ==
+ if (texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA] ==
operand)
return;
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA_EXT] = operand;
- break;
- default:
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", operand);
- return;
- }
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
- break;
- case GL_OPERAND2_RGB_EXT:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- const GLenum operand = (GLenum) (GLint) *param;
- switch (operand) {
- case GL_SRC_COLOR: /* ARB combine only */
- case GL_ONE_MINUS_SRC_COLOR: /* ARB combine only */
- case GL_SRC_ALPHA:
- case GL_ONE_MINUS_SRC_ALPHA: /* ARB combine only */
- if (texUnit->CombineOperandRGB[2] == operand)
- return;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texUnit->CombineOperandRGB[2] = operand;
- break;
- default:
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", operand);
- return;
- }
- }
- else {
- TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname);
- return;
- }
- break;
- case GL_OPERAND2_ALPHA_EXT:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- const GLenum operand = (GLenum) (GLint) *param;
- switch (operand) {
- case GL_SRC_ALPHA:
- case GL_ONE_MINUS_SRC_ALPHA: /* ARB combine only */
- if (texUnit->CombineOperandA[2] == operand)
- return;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- texUnit->CombineOperandA[2] = operand;
+ texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA] = operand;
break;
default:
TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", operand);
@@ -398,7 +410,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
break;
- case GL_RGB_SCALE_EXT:
+ case GL_RGB_SCALE:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
GLuint newshift;
@@ -575,7 +587,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
case GL_TEXTURE_ENV_COLOR:
COPY_4FV( params, texUnit->EnvColor );
break;
- case GL_COMBINE_RGB_EXT:
+ case GL_COMBINE_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineModeRGB;
@@ -584,7 +596,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_COMBINE_ALPHA_EXT:
+ case GL_COMBINE_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineModeA;
@@ -593,7 +605,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_SOURCE0_RGB_EXT:
+ case GL_SOURCE0_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineSourceRGB[0];
@@ -602,7 +614,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_SOURCE1_RGB_EXT:
+ case GL_SOURCE1_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineSourceRGB[1];
@@ -611,7 +623,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_SOURCE2_RGB_EXT:
+ case GL_SOURCE2_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineSourceRGB[2];
@@ -620,7 +632,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_SOURCE0_ALPHA_EXT:
+ case GL_SOURCE0_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineSourceA[0];
@@ -629,7 +641,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_SOURCE1_ALPHA_EXT:
+ case GL_SOURCE1_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineSourceA[1];
@@ -638,7 +650,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_SOURCE2_ALPHA_EXT:
+ case GL_SOURCE2_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineSourceA[2];
@@ -647,7 +659,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_OPERAND0_RGB_EXT:
+ case GL_OPERAND0_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineOperandRGB[0];
@@ -656,7 +668,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_OPERAND1_RGB_EXT:
+ case GL_OPERAND1_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineOperandRGB[1];
@@ -665,7 +677,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_OPERAND2_RGB_EXT:
+ case GL_OPERAND2_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineOperandRGB[2];
@@ -674,7 +686,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_OPERAND0_ALPHA_EXT:
+ case GL_OPERAND0_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineOperandA[0];
@@ -683,7 +695,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_OPERAND1_ALPHA_EXT:
+ case GL_OPERAND1_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineOperandA[1];
@@ -692,7 +704,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_OPERAND2_ALPHA_EXT:
+ case GL_OPERAND2_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLfloat) texUnit->CombineOperandA[2];
@@ -701,7 +713,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
}
break;
- case GL_RGB_SCALE_EXT:
+ case GL_RGB_SCALE:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
if (texUnit->CombineScaleShiftRGB == 0)
@@ -788,7 +800,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
params[2] = FLOAT_TO_INT( texUnit->EnvColor[2] );
params[3] = FLOAT_TO_INT( texUnit->EnvColor[3] );
break;
- case GL_COMBINE_RGB_EXT:
+ case GL_COMBINE_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineModeRGB;
@@ -797,7 +809,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_COMBINE_ALPHA_EXT:
+ case GL_COMBINE_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineModeA;
@@ -806,7 +818,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_SOURCE0_RGB_EXT:
+ case GL_SOURCE0_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineSourceRGB[0];
@@ -815,7 +827,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_SOURCE1_RGB_EXT:
+ case GL_SOURCE1_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineSourceRGB[1];
@@ -824,7 +836,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_SOURCE2_RGB_EXT:
+ case GL_SOURCE2_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineSourceRGB[2];
@@ -833,7 +845,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_SOURCE0_ALPHA_EXT:
+ case GL_SOURCE0_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineSourceA[0];
@@ -842,7 +854,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_SOURCE1_ALPHA_EXT:
+ case GL_SOURCE1_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineSourceA[1];
@@ -851,7 +863,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_SOURCE2_ALPHA_EXT:
+ case GL_SOURCE2_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineSourceA[2];
@@ -860,7 +872,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_OPERAND0_RGB_EXT:
+ case GL_OPERAND0_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineOperandRGB[0];
@@ -869,7 +881,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_OPERAND1_RGB_EXT:
+ case GL_OPERAND1_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineOperandRGB[1];
@@ -878,7 +890,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_OPERAND2_RGB_EXT:
+ case GL_OPERAND2_RGB:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineOperandRGB[2];
@@ -887,7 +899,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_OPERAND0_ALPHA_EXT:
+ case GL_OPERAND0_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineOperandA[0];
@@ -896,7 +908,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_OPERAND1_ALPHA_EXT:
+ case GL_OPERAND1_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineOperandA[1];
@@ -905,7 +917,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_OPERAND2_ALPHA_EXT:
+ case GL_OPERAND2_ALPHA:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
*params = (GLint) texUnit->CombineOperandA[2];
@@ -914,7 +926,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
}
break;
- case GL_RGB_SCALE_EXT:
+ case GL_RGB_SCALE:
if (ctx->Extensions.EXT_texture_env_combine ||
ctx->Extensions.ARB_texture_env_combine) {
if (texUnit->CombineScaleShiftRGB == 0)
@@ -1020,10 +1032,10 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
case GL_TEXTURE_2D:
texObj = texUnit->Current2D;
break;
- case GL_TEXTURE_3D_EXT:
+ case GL_TEXTURE_3D:
texObj = texUnit->Current3D;
break;
- case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_TEXTURE_CUBE_MAP:
if (!ctx->Extensions.ARB_texture_cube_map) {
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
return;
@@ -1082,7 +1094,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
if (texObj->WrapS == eparam)
return;
if (eparam == GL_CLAMP || eparam == GL_CLAMP_TO_EDGE ||
- (eparam == GL_CLAMP_TO_BORDER_ARB &&
+ (eparam == GL_CLAMP_TO_BORDER &&
ctx->Extensions.ARB_texture_border_clamp)) {
/* any texture target */
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -1090,7 +1102,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
}
else if (texObj->Target != GL_TEXTURE_RECTANGLE_NV &&
(eparam == GL_REPEAT ||
- (eparam == GL_MIRRORED_REPEAT_ARB &&
+ (eparam == GL_MIRRORED_REPEAT &&
ctx->Extensions.ARB_texture_mirrored_repeat) ||
(eparam == GL_MIRROR_CLAMP_ATI &&
ctx->Extensions.ATI_texture_mirror_once) ||
@@ -1109,7 +1121,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
if (texObj->WrapT == eparam)
return;
if (eparam == GL_CLAMP || eparam == GL_CLAMP_TO_EDGE ||
- (eparam == GL_CLAMP_TO_BORDER_ARB &&
+ (eparam == GL_CLAMP_TO_BORDER &&
ctx->Extensions.ARB_texture_border_clamp)) {
/* any texture target */
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -1117,7 +1129,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
}
else if (texObj->Target != GL_TEXTURE_RECTANGLE_NV &&
(eparam == GL_REPEAT ||
- (eparam == GL_MIRRORED_REPEAT_ARB &&
+ (eparam == GL_MIRRORED_REPEAT &&
ctx->Extensions.ARB_texture_mirrored_repeat) ||
(eparam == GL_MIRROR_CLAMP_ATI &&
ctx->Extensions.ATI_texture_mirror_once) ||
@@ -1132,11 +1144,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
return;
}
break;
- case GL_TEXTURE_WRAP_R_EXT:
+ case GL_TEXTURE_WRAP_R:
if (texObj->WrapR == eparam)
return;
if (eparam == GL_CLAMP || eparam == GL_CLAMP_TO_EDGE ||
- (eparam == GL_CLAMP_TO_BORDER_ARB &&
+ (eparam == GL_CLAMP_TO_BORDER &&
ctx->Extensions.ARB_texture_border_clamp)) {
/* any texture target */
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -1144,7 +1156,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
}
else if (texObj->Target != GL_TEXTURE_RECTANGLE_NV &&
(eparam == GL_REPEAT ||
- (eparam == GL_MIRRORED_REPEAT_ARB &&
+ (eparam == GL_MIRRORED_REPEAT &&
ctx->Extensions.ARB_texture_mirrored_repeat) ||
(eparam == GL_MIRROR_CLAMP_ATI &&
ctx->Extensions.ATI_texture_mirror_once) ||
@@ -1279,7 +1291,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
}
else {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTexParameter(bad GL_TEXTURE_COMPARE_MODE_ARB)");
+ "glTexParameter(bad GL_TEXTURE_COMPARE_MODE_ARB: 0x%x)", mode);
return;
}
}
@@ -1404,14 +1416,14 @@ tex_image_dimensions(GLcontext *ctx, GLenum target)
case GL_TEXTURE_3D:
case GL_PROXY_TEXTURE_3D:
return 3;
- case GL_TEXTURE_CUBE_MAP_ARB:
- case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP:
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
return ctx->Extensions.ARB_texture_cube_map ? 2 : 0;
case GL_TEXTURE_RECTANGLE_NV:
case GL_PROXY_TEXTURE_RECTANGLE_NV:
@@ -1453,13 +1465,13 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
case GL_PROXY_TEXTURE_3D:
maxLevels = ctx->Const.Max3DTextureLevels;
break;
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
- case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ case GL_PROXY_TEXTURE_CUBE_MAP:
maxLevels = ctx->Const.MaxCubeTextureLevels;
break;
case GL_TEXTURE_RECTANGLE_NV:
@@ -1489,7 +1501,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
isProxy = (target == GL_PROXY_TEXTURE_1D) ||
(target == GL_PROXY_TEXTURE_2D) ||
(target == GL_PROXY_TEXTURE_3D) ||
- (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) ||
+ (target == GL_PROXY_TEXTURE_CUBE_MAP) ||
(target == GL_PROXY_TEXTURE_RECTANGLE_NV);
switch (pname) {
@@ -1568,7 +1580,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
return;
/* GL_ARB_texture_compression */
- case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:
+ case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
if (ctx->Extensions.ARB_texture_compression) {
if (img->IsCompressed && !isProxy)
*params = img->CompressedSize;
@@ -1581,7 +1593,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
"glGetTexLevelParameter[if]v(pname)");
}
return;
- case GL_TEXTURE_COMPRESSED_ARB:
+ case GL_TEXTURE_COMPRESSED:
if (ctx->Extensions.ARB_texture_compression) {
*params = (GLint) img->IsCompressed;
}
@@ -1626,7 +1638,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_TEXTURE_WRAP_T:
*params = ENUM_TO_FLOAT(obj->WrapT);
return;
- case GL_TEXTURE_WRAP_R_EXT:
+ case GL_TEXTURE_WRAP_R:
*params = ENUM_TO_FLOAT(obj->WrapR);
return;
case GL_TEXTURE_BORDER_COLOR:
@@ -1743,7 +1755,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_TEXTURE_WRAP_T:
*params = (GLint) obj->WrapT;
return;
- case GL_TEXTURE_WRAP_R_EXT:
+ case GL_TEXTURE_WRAP_R:
*params = (GLint) obj->WrapR;
return;
case GL_TEXTURE_BORDER_COLOR:
@@ -2391,7 +2403,7 @@ void
_mesa_ActiveTextureARB( GLenum target )
{
GET_CURRENT_CONTEXT(ctx);
- GLuint texUnit = target - GL_TEXTURE0_ARB;
+ GLuint texUnit = target - GL_TEXTURE0;
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
@@ -2400,7 +2412,7 @@ _mesa_ActiveTextureARB( GLenum target )
/* Cater for texture unit 0 is first, therefore use >= */
if (texUnit >= ctx->Const.MaxTextureUnits) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTextureARB(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(target)");
return;
}
@@ -2423,11 +2435,11 @@ void
_mesa_ClientActiveTextureARB( GLenum target )
{
GET_CURRENT_CONTEXT(ctx);
- GLuint texUnit = target - GL_TEXTURE0_ARB;
+ GLuint texUnit = target - GL_TEXTURE0;
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (texUnit > ctx->Const.MaxTextureUnits) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTextureARB(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(target)");
return;
}
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index 6950b21129..706c3287e1 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -1,10 +1,10 @@
-/* $Id: texstate.h,v 1.9 2002/06/17 23:36:31 brianp Exp $ */
+/* $Id: texstate.h,v 1.9.4.1 2003/02/28 16:28:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.0.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 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"),
@@ -35,6 +35,9 @@
extern void
_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst );
+extern void
+_mesa_print_texunit_state( GLcontext *ctx, GLuint unit );
+
/*** Called from API ***/