summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-03-23 16:23:14 +0000
committerBrian Paul <[email protected]>2000-03-23 16:23:14 +0000
commitb132e8da5e5f2b7da1f2141e0322e66bb0608e02 (patch)
tree9acd3fdf4d64562f229ed5409638ea21db7499db
parentf87c5e229f9721aba6a298230979feb18041c084 (diff)
replaced decode_internal_format() with _mesa_base_tex_format()
-rw-r--r--src/mesa/main/teximage.c12
-rw-r--r--src/mesa/main/teximage.h6
2 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d6b621fbbe7..d40655c1392 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.24 2000/03/22 17:38:11 brianp Exp $ */
+/* $Id: teximage.c,v 1.25 2000/03/23 16:23:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -85,8 +85,8 @@ logbase2( int n )
* GL_LUMANCE_ALPHA, GL_INTENSITY, GL_RGB, or GL_RGBA.
* Return -1 if invalid enum.
*/
-static GLint
-decode_internal_format( GLint format )
+GLint
+_mesa_base_tex_format( GLint format )
{
switch (format) {
case GL_ALPHA:
@@ -356,7 +356,7 @@ init_texture_image( struct gl_texture_image *img,
{
ASSERT(img);
ASSERT(!img->Data);
- img->Format = (GLenum) decode_internal_format(internalFormat);
+ img->Format = (GLenum) _mesa_base_tex_format(internalFormat);
set_teximage_component_sizes( img );
img->IntFormat = (GLenum) internalFormat;
img->Border = border;
@@ -696,7 +696,7 @@ texture_error_check( GLcontext *ctx, GLenum target,
return GL_TRUE;
}
- iformat = decode_internal_format( internalFormat );
+ iformat = _mesa_base_tex_format( internalFormat );
if (iformat < 0) {
if (!isProxy) {
char message[100];
@@ -895,7 +895,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
- iformat = decode_internal_format( internalFormat );
+ iformat = _mesa_base_tex_format( internalFormat );
if (iformat < 0) {
char message[100];
sprintf(message, "glCopyTexImage%dD(internalFormat)", dimensions);
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index bd6202875ad..3dfafe29160 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -1,4 +1,4 @@
-/* $Id: teximage.h,v 1.4 2000/01/31 23:10:16 brianp Exp $ */
+/* $Id: teximage.h,v 1.5 2000/03/23 16:23:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -35,6 +35,10 @@
/*** Internal functions ***/
+extern GLint
+_mesa_base_tex_format( GLint format );
+
+
extern struct gl_texture_image *
gl_alloc_texture_image( void );