texFormat was a random value in _mesa_store_teximage3d(), fix by undoing last changes
[mesa.git] / src / mesa / main / teximage.h
1 /* $Id: teximage.h,v 1.18 2001/03/26 20:02:39 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.5
6 *
7 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 #ifndef TEXIMAGE_H
29 #define TEXIMAGE_H
30
31
32 #include "mtypes.h"
33
34
35 /*** Internal functions ***/
36
37
38 extern GLint
39 _mesa_base_tex_format( GLcontext *ctx, GLint format );
40
41
42 extern struct gl_texture_image *
43 _mesa_alloc_texture_image( void );
44
45
46 extern void
47 _mesa_free_texture_image( struct gl_texture_image *teximage );
48
49
50 extern struct gl_texture_object *
51 _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
52 GLenum target);
53
54
55 extern struct gl_texture_image *
56 _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
57 GLenum target, GLint level);
58
59
60
61 /*** API entry point functions ***/
62
63
64 extern void
65 _mesa_TexImage1D( GLenum target, GLint level, GLint internalformat,
66 GLsizei width, GLint border,
67 GLenum format, GLenum type, const GLvoid *pixels );
68
69
70 extern void
71 _mesa_TexImage2D( GLenum target, GLint level, GLint internalformat,
72 GLsizei width, GLsizei height, GLint border,
73 GLenum format, GLenum type, const GLvoid *pixels );
74
75
76 extern void
77 _mesa_TexImage3D( GLenum target, GLint level, GLenum internalformat,
78 GLsizei width, GLsizei height, GLsizei depth, GLint border,
79 GLenum format, GLenum type, const GLvoid *pixels );
80
81
82 extern void
83 _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat,
84 GLsizei width, GLsizei height, GLsizei depth,
85 GLint border, GLenum format, GLenum type,
86 const GLvoid *pixels );
87
88
89 extern void
90 _mesa_GetTexImage( GLenum target, GLint level,
91 GLenum format, GLenum type, GLvoid *pixels );
92
93
94 extern void
95 _mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset,
96 GLsizei width,
97 GLenum format, GLenum type,
98 const GLvoid *pixels );
99
100
101 extern void
102 _mesa_TexSubImage2D( GLenum target, GLint level,
103 GLint xoffset, GLint yoffset,
104 GLsizei width, GLsizei height,
105 GLenum format, GLenum type,
106 const GLvoid *pixels );
107
108
109 extern void
110 _mesa_TexSubImage3D( GLenum target, GLint level,
111 GLint xoffset, GLint yoffset, GLint zoffset,
112 GLsizei width, GLsizei height, GLsizei depth,
113 GLenum format, GLenum type,
114 const GLvoid *pixels );
115
116
117 extern void
118 _mesa_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat,
119 GLint x, GLint y, GLsizei width, GLint border );
120
121
122 extern void
123 _mesa_CopyTexImage2D( GLenum target, GLint level,
124 GLenum internalformat, GLint x, GLint y,
125 GLsizei width, GLsizei height, GLint border );
126
127
128 extern void
129 _mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset,
130 GLint x, GLint y, GLsizei width );
131
132
133 extern void
134 _mesa_CopyTexSubImage2D( GLenum target, GLint level,
135 GLint xoffset, GLint yoffset,
136 GLint x, GLint y, GLsizei width, GLsizei height );
137
138
139 extern void
140 _mesa_CopyTexSubImage3D( GLenum target, GLint level,
141 GLint xoffset, GLint yoffset, GLint zoffset,
142 GLint x, GLint y, GLsizei width, GLsizei height );
143
144
145
146 extern void
147 _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
148 GLenum internalformat, GLsizei width,
149 GLint border, GLsizei imageSize,
150 const GLvoid *data);
151
152 extern void
153 _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
154 GLenum internalformat, GLsizei width,
155 GLsizei height, GLint border, GLsizei imageSize,
156 const GLvoid *data);
157
158 extern void
159 _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
160 GLenum internalformat, GLsizei width,
161 GLsizei height, GLsizei depth, GLint border,
162 GLsizei imageSize, const GLvoid *data);
163
164 #ifdef VMS
165 #define _mesa_CompressedTexSubImage1DARB _mesa_CompressedTexSubImage1DAR
166 #define _mesa_CompressedTexSubImage2DARB _mesa_CompressedTexSubImage2DAR
167 #define _mesa_CompressedTexSubImage3DARB _mesa_CompressedTexSubImage3DAR
168 #endif
169 extern void
170 _mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
171 GLsizei width, GLenum format,
172 GLsizei imageSize, const GLvoid *data);
173
174 extern void
175 _mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
176 GLint yoffset, GLsizei width, GLsizei height,
177 GLenum format, GLsizei imageSize,
178 const GLvoid *data);
179
180 extern void
181 _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
182 GLint yoffset, GLint zoffset, GLsizei width,
183 GLsizei height, GLsizei depth, GLenum format,
184 GLsizei imageSize, const GLvoid *data);
185
186 extern void
187 _mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
188
189
190 #endif