diff options
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 2d7db2d5193..fae67d4fc7c 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1,8 +1,8 @@ -/* $Id: texobj.c,v 1.7 1999/11/05 06:43:11 brianp Exp $ */ +/* $Id: texobj.c,v 1.8 1999/11/11 01:22:28 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.1 + * Version: 3.3 * * Copyright (C) 1999 Brian Paul All Rights Reserved. * @@ -23,25 +23,16 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/texobj.c,v 1.3 1999/04/04 00:20:32 dawes Exp $ */ - - #ifdef PC_HEADER #include "all.h" #else -#ifndef XFree86Server -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> -#else -#include "GL/xf86glx.h" -#endif +#include "glheader.h" #include "context.h" #include "enums.h" #include "hash.h" -#include "macros.h" +#include "mem.h" #include "teximage.h" #include "texstate.h" #include "texobj.h" @@ -83,13 +74,13 @@ gl_alloc_texture_object( struct gl_shared_state *shared, GLuint name, obj->BaseLevel = 0; obj->MaxLevel = 1000; obj->MinMagThresh = 0.0F; - obj->Palette[0] = 255; - obj->Palette[1] = 255; - obj->Palette[2] = 255; - obj->Palette[3] = 255; - obj->PaletteSize = 1; - obj->PaletteIntFormat = GL_RGBA; - obj->PaletteFormat = GL_RGBA; + obj->Palette.Table[0] = 255; + obj->Palette.Table[1] = 255; + obj->Palette.Table[2] = 255; + obj->Palette.Table[3] = 255; + obj->Palette.Size = 1; + obj->Palette.IntFormat = GL_RGBA; + obj->Palette.Format = GL_RGBA; /* insert into linked list */ if (shared) { @@ -334,8 +325,10 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur /* * Execute glGenTextures */ -void gl_GenTextures( GLcontext *ctx, GLsizei n, GLuint *texName ) +void +_mesa_GenTextures( GLsizei n, GLuint *texName ) { + GET_CURRENT_CONTEXT(ctx); GLuint first; GLint i; @@ -365,8 +358,10 @@ void gl_GenTextures( GLcontext *ctx, GLsizei n, GLuint *texName ) /* * Execute glDeleteTextures */ -void gl_DeleteTextures( GLcontext *ctx, GLsizei n, const GLuint *texName) +void +_mesa_DeleteTextures( GLsizei n, const GLuint *texName) { + GET_CURRENT_CONTEXT(ctx); GLint i; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDeleteTextures"); @@ -409,8 +404,10 @@ void gl_DeleteTextures( GLcontext *ctx, GLsizei n, const GLuint *texName) /* * Execute glBindTexture */ -void gl_BindTexture( GLcontext *ctx, GLenum target, GLuint texName ) +void +_mesa_BindTexture( GLenum target, GLuint texName ) { + GET_CURRENT_CONTEXT(ctx); GLuint unit = ctx->Texture.CurrentUnit; struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; struct gl_texture_object *oldTexObj; @@ -501,10 +498,11 @@ void gl_BindTexture( GLcontext *ctx, GLenum target, GLuint texName ) /* * Execute glPrioritizeTextures */ -void gl_PrioritizeTextures( GLcontext *ctx, - GLsizei n, const GLuint *texName, - const GLclampf *priorities ) +void +_mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, + const GLclampf *priorities ) { + GET_CURRENT_CONTEXT(ctx); GLint i; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPrioritizeTextures"); @@ -533,10 +531,11 @@ void gl_PrioritizeTextures( GLcontext *ctx, /* * Execute glAreTexturesResident */ -GLboolean gl_AreTexturesResident( GLcontext *ctx, GLsizei n, - const GLuint *texName, - GLboolean *residences ) +GLboolean +_mesa_AreTexturesResident( GLsizei n, const GLuint *texName, + GLboolean *residences ) { + GET_CURRENT_CONTEXT(ctx); GLboolean resident = GL_TRUE; GLint i; @@ -575,8 +574,10 @@ GLboolean gl_AreTexturesResident( GLcontext *ctx, GLsizei n, /* * Execute glIsTexture */ -GLboolean gl_IsTexture( GLcontext *ctx, GLuint texture ) +GLboolean +_mesa_IsTexture( GLuint texture ) { + GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, "glIsTextures", GL_FALSE); if (texture>0 && HashLookup(ctx->Shared->TexObjects, texture)) { |