aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/context.c14
-rw-r--r--src/mesa/main/teximage.c22
-rw-r--r--src/mesa/main/teximage.h10
-rw-r--r--src/mesa/main/texobj.c4
4 files changed, 27 insertions, 23 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 493a88689dc..e19fecedd94 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -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);
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d52b051d7fa..2547d6cadac 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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);
}
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 3dfafe29160..9aa3a0714be 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -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 ***/
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 02de5a30794..726c107a193 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -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] );
}
}
}