put _mesa prefix on some functions
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 27 Mar 2000 17:54:17 +0000 (17:54 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 27 Mar 2000 17:54:17 +0000 (17:54 +0000)
src/mesa/main/context.c
src/mesa/main/teximage.c
src/mesa/main/teximage.h
src/mesa/main/texobj.c

index 493a88689dc22d324b07adf254b63195ad51a8b9..e19fecedd94506d9eb7cb353904c61992b962201 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.50 2000/03/22 23:20:12 brianp Exp $ */
+/* $Id: context.c,v 1.51 2000/03/27 17:54:17 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -1277,9 +1277,9 @@ static GLboolean alloc_proxy_textures( GLcontext *ctx )
 
    out_of_memory = GL_FALSE;
    for (i=0;i<MAX_TEXTURE_LEVELS;i++) {
-      ctx->Texture.Proxy1D->Image[i] = gl_alloc_texture_image();
-      ctx->Texture.Proxy2D->Image[i] = gl_alloc_texture_image();
-      ctx->Texture.Proxy3D->Image[i] = gl_alloc_texture_image();
+      ctx->Texture.Proxy1D->Image[i] = _mesa_alloc_texture_image();
+      ctx->Texture.Proxy2D->Image[i] = _mesa_alloc_texture_image();
+      ctx->Texture.Proxy3D->Image[i] = _mesa_alloc_texture_image();
       if (!ctx->Texture.Proxy1D->Image[i]
           || !ctx->Texture.Proxy2D->Image[i]
           || !ctx->Texture.Proxy3D->Image[i]) {
@@ -1289,13 +1289,13 @@ static GLboolean alloc_proxy_textures( GLcontext *ctx )
    if (out_of_memory) {
       for (i=0;i<MAX_TEXTURE_LEVELS;i++) {
          if (ctx->Texture.Proxy1D->Image[i]) {
-            gl_free_texture_image(ctx->Texture.Proxy1D->Image[i]);
+            _mesa_free_texture_image(ctx->Texture.Proxy1D->Image[i]);
          }
          if (ctx->Texture.Proxy2D->Image[i]) {
-            gl_free_texture_image(ctx->Texture.Proxy2D->Image[i]);
+            _mesa_free_texture_image(ctx->Texture.Proxy2D->Image[i]);
          }
          if (ctx->Texture.Proxy3D->Image[i]) {
-            gl_free_texture_image(ctx->Texture.Proxy3D->Image[i]);
+            _mesa_free_texture_image(ctx->Texture.Proxy3D->Image[i]);
          }
       }
       gl_free_texture_object(NULL, ctx->Texture.Proxy1D);
index d52b051d7fa90a2a33964d5f4d899ddff0ef3160..2547d6cadacc56d980edef7ad6db737ffb346345 100644 (file)
@@ -338,7 +338,7 @@ set_teximage_component_sizes( struct gl_texture_image *texImage )
  * Return new gl_texture_image struct with all fields initialized to zero.
  */
 struct gl_texture_image *
-gl_alloc_texture_image( void )
+_mesa_alloc_texture_image( void )
 {
    return CALLOC_STRUCT(gl_texture_image);
 }
@@ -380,7 +380,7 @@ init_texture_image( struct gl_texture_image *img,
 
 
 void
-gl_free_texture_image( struct gl_texture_image *teximage )
+_mesa_free_texture_image( struct gl_texture_image *teximage )
 {
    if (teximage->Data) {
       FREE( teximage->Data );
@@ -1033,7 +1033,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
       texImage = texObj->Image[level];
 
       if (!texImage) {
-         texImage = gl_alloc_texture_image();
+         texImage = _mesa_alloc_texture_image();
          texObj->Image[level] = texImage;
          if (!texImage) {
             gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
@@ -1141,7 +1141,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
       texImage = texObj->Image[level];
 
       if (!texImage) {
-         texImage = gl_alloc_texture_image();
+         texImage = _mesa_alloc_texture_image();
          texObj->Image[level] = texImage;
          if (!texImage) {
             gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
@@ -1263,7 +1263,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
       texImage = texObj->Image[level];
 
       if (!texImage) {
-         texImage = gl_alloc_texture_image();
+         texImage = _mesa_alloc_texture_image();
          texObj->Image[level] = texImage;
          if (!texImage) {
             gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
@@ -1364,9 +1364,9 @@ _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat,
  * Fetch a texture image from the device driver.
  * Store the results in the given texture object at the given mipmap level.
  */
-static void
-get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level,
-                          const struct gl_texture_object *texObj )
+void
+_mesa_get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level,
+                                const struct gl_texture_object *texObj )
 {
    GLvoid *image;
    GLenum imgFormat, imgType;
@@ -1503,7 +1503,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
 
    if (!texImage->Data) {
       /* try to get the texture image from the device driver */
-      get_teximage_from_driver(ctx, target, level, texObj);
+      _mesa_get_teximage_from_driver(ctx, target, level, texObj);
       discardImage = GL_TRUE;
    }
    else {
@@ -1643,7 +1643,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
       const GLint xoffsetb = xoffset + texImage->Border;
       GLboolean retain = GL_TRUE;
       if (!texImage->Data) {
-         get_teximage_from_driver( ctx, target, level, texObj );
+         _mesa_get_teximage_from_driver( ctx, target, level, texObj );
          if (!texImage->Data) {
             make_null_texture(texImage);
          }
@@ -1730,7 +1730,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
       GLboolean retain = GL_TRUE;
 
       if (!texImage->Data) {
-         get_teximage_from_driver( ctx, target, level, texObj );
+         _mesa_get_teximage_from_driver( ctx, target, level, texObj );
          if (!texImage->Data) {
             make_null_texture(texImage);
          }
index 3dfafe29160468208d3bd69f68ca72d9c51d3977..9aa3a0714be01256f002ae9193a735a3b23c3736 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: teximage.h,v 1.5 2000/03/23 16:23:14 brianp Exp $ */
+/* $Id: teximage.h,v 1.6 2000/03/27 17:54:17 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -40,13 +40,17 @@ _mesa_base_tex_format( GLint format );
 
 
 extern struct gl_texture_image *
-gl_alloc_texture_image( void );
+_mesa_alloc_texture_image( void );
 
 
 extern void
-gl_free_texture_image( struct gl_texture_image *teximage );
+_mesa_free_texture_image( struct gl_texture_image *teximage );
 
 
+extern void
+_mesa_get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level,
+                                const struct gl_texture_object *texObj );
+
 
 /*** API entry point functions ***/
 
index 02de5a30794c86a72229d513e78f3ad80d79070e..726c107a193cc9dfb4509fe0013ce1430f85e535 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: texobj.c,v 1.15 2000/03/21 17:42:27 brianp Exp $ */
+/* $Id: texobj.c,v 1.16 2000/03/27 17:55:19 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -149,7 +149,7 @@ void gl_free_texture_object( struct gl_shared_state *shared,
       GLuint i;
       for (i=0;i<MAX_TEXTURE_LEVELS;i++) {
          if (t->Image[i]) {
-            gl_free_texture_image( t->Image[i] );
+            _mesa_free_texture_image( t->Image[i] );
          }
       }
    }