1
/* -*- mode: c; c-basic-offset: 3 -*-
3
* Copyright 2000 VA Linux Systems Inc., Fremont, California.
7
* Permission is hereby granted, free of charge, to any person obtaining a
8
* copy of this software and associated documentation files (the "Software"),
9
* to deal in the Software without restriction, including without limitation
10
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
* and/or sell copies of the Software, and to permit persons to whom the
12
* Software is furnished to do so, subject to the following conditions:
14
* The above copyright notice and this permission notice (including the next
15
* paragraph) shall be included in all copies or substantial portions of the
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21
* VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
23
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h,v 1.2 2002/02/22 21:45:04 dawes Exp $ */
30
* Gareth Hughes <gareth@valinux.com>, 29 Sep - 1 Oct 2000
33
* Gareth Hughes <gareth@valinux.com>
34
* Brian Paul <brianp@valinux.com>
45
#define tdfxDDIsCompressedFormatMacro(internalFormat) \
46
(((internalFormat) == GL_COMPRESSED_RGB_FXT1_3DFX) || \
47
((internalFormat) == GL_COMPRESSED_RGBA_FXT1_3DFX))
48
#define tdfxDDIsCompressedGlideFormatMacro(internalFormat) \
49
((internalFormat) == GR_TEXFMT_ARGB_CMP_FXT1)
54
tdfxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj);
57
tdfxDDBindTexture(GLcontext * ctx, GLenum target,
58
struct gl_texture_object *tObj);
61
tdfxDDDeleteTexture(GLcontext * ctx, struct gl_texture_object *tObj);
64
tdfxDDIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj);
67
tdfxDDTexturePalette(GLcontext * ctx, struct gl_texture_object *tObj);
71
fxDDTexUseGlobalPalette(GLcontext * ctx, GLboolean state);
75
tdfxDDTexEnv(GLcontext * ctx, GLenum target, GLenum pname,
76
const GLfloat * param);
79
tdfxDDTexParameter(GLcontext * ctx, GLenum target,
80
struct gl_texture_object *tObj,
81
GLenum pname, const GLfloat * params);
83
extern const struct gl_texture_format *
84
tdfxDDChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
85
GLenum srcFormat, GLenum srcType );
88
tdfxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level,
89
GLint internalFormat, GLint width, GLint height,
91
GLenum format, GLenum type, const GLvoid * pixels,
92
const struct gl_pixelstore_attrib * packing,
93
struct gl_texture_object * texObj,
94
struct gl_texture_image * texImage);
97
tdfxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
98
GLint xoffset, GLint yoffset,
99
GLsizei width, GLsizei height,
100
GLenum format, GLenum type,
101
const GLvoid *pixels,
102
const struct gl_pixelstore_attrib *packing,
103
struct gl_texture_object *texObj,
104
struct gl_texture_image *texImage );
108
tdfxDDCompressedTexImage2D( GLcontext *ctx, GLenum target,
109
GLint level, GLsizei imageSize,
111
struct gl_texture_object *texObj,
112
struct gl_texture_image *texImage,
113
GLboolean *retainInternalCopy);
116
tdfxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
117
GLint level, GLint xoffset,
118
GLint yoffset, GLsizei width,
119
GLint height, GLenum format,
120
GLsizei imageSize, const GLvoid *data,
121
struct gl_texture_object *texObj,
122
struct gl_texture_image *texImage );
126
tdfxDDTestProxyTexImage(GLcontext *ctx, GLenum target,
127
GLint level, GLint internalFormat,
128
GLenum format, GLenum type,
129
GLint width, GLint height,
130
GLint depth, GLint border);
133
tdfxDDGetTexImage(GLcontext * ctx, GLenum target, GLint level,
134
const struct gl_texture_object *texObj,
135
GLenum * formatOut, GLenum * typeOut,
136
GLboolean * freeImageOut);
139
tdfxDDGetCompressedTexImage( GLcontext *ctx, GLenum target,
140
GLint lod, void *image,
141
const struct gl_texture_object *texObj,
142
struct gl_texture_image *texImage );
145
tdfxDDSpecificCompressedTexFormat(GLcontext *ctx,
146
GLint internalFormat,
147
GLint numDimensions);
150
tdfxDDBaseCompressedTexFormat(GLcontext *ctx,
151
GLint internalFormat);
154
tdfxDDIsCompressedFormat(GLcontext *ctx, GLint internalFormat);
157
tdfxDDCompressedImageSize(GLcontext *ctx,
159
GLuint numDimensions,