initial work for GL_ARB_texture_compression
[mesa.git] / src / mesa / main / teximage.h
1 /* $Id: teximage.h,v 1.9 2000/05/23 20:10:50 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999-2000 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 "types.h"
33
34
35 /*** Internal functions ***/
36
37
38 extern GLint
39 _mesa_base_tex_format( 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, 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 extern void
61 _mesa_get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level,
62 const struct gl_texture_object *texObj );
63
64
65 /*** API entry point functions ***/
66
67
68 extern void
69 _mesa_TexImage1D( GLenum target, GLint level, GLint internalformat,
70 GLsizei width, GLint border,
71 GLenum format, GLenum type, const GLvoid *pixels );
72
73
74 extern void
75 _mesa_TexImage2D( GLenum target, GLint level, GLint internalformat,
76 GLsizei width, GLsizei height, GLint border,
77 GLenum format, GLenum type, const GLvoid *pixels );
78
79
80 extern void
81 _mesa_TexImage3D( GLenum target, GLint level, GLint internalformat,
82 GLsizei width, GLsizei height, GLsizei depth, GLint border,
83 GLenum format, GLenum type, const GLvoid *pixels );
84
85
86 extern void
87 _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat,
88 GLsizei width, GLsizei height, GLsizei depth,
89 GLint border, GLenum format, GLenum type,
90 const GLvoid *pixels );
91
92
93 extern void
94 _mesa_GetTexImage( GLenum target, GLint level,
95 GLenum format, GLenum type, GLvoid *pixels );
96
97
98 extern void
99 _mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset,
100 GLsizei width,
101 GLenum format, GLenum type,
102 const GLvoid *pixels );
103
104
105 extern void
106 _mesa_TexSubImage2D( GLenum target, GLint level,
107 GLint xoffset, GLint yoffset,
108 GLsizei width, GLsizei height,
109 GLenum format, GLenum type,
110 const GLvoid *pixels );
111
112
113 extern void
114 _mesa_TexSubImage3D( GLenum target, GLint level,
115 GLint xoffset, GLint yoffset, GLint zoffset,
116 GLsizei width, GLsizei height, GLsizei depth,
117 GLenum format, GLenum type,
118 const GLvoid *pixels );
119
120
121 extern void
122 _mesa_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat,
123 GLint x, GLint y, GLsizei width, GLint border );
124
125
126 extern void
127 _mesa_CopyTexImage2D( GLenum target, GLint level,
128 GLenum internalformat, GLint x, GLint y,
129 GLsizei width, GLsizei height, GLint border );
130
131
132 extern void
133 _mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset,
134 GLint x, GLint y, GLsizei width );
135
136
137 extern void
138 _mesa_CopyTexSubImage2D( GLenum target, GLint level,
139 GLint xoffset, GLint yoffset,
140 GLint x, GLint y, GLsizei width, GLsizei height );
141
142
143 extern void
144 _mesa_CopyTexSubImage3D( GLenum target, GLint level,
145 GLint xoffset, GLint yoffset, GLint zoffset,
146 GLint x, GLint y, GLsizei width, GLsizei height );
147
148
149
150 extern void
151 _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
152 GLenum internalformat, GLsizei width,
153 GLint border, GLsizei imageSize,
154 const GLvoid *data);
155
156 extern void
157 _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
158 GLenum internalformat, GLsizei width,
159 GLsizei height, GLint border, GLsizei imageSize,
160 const GLvoid *data);
161
162 extern void
163 _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
164 GLenum internalformat, GLsizei width,
165 GLsizei height, GLsizei depth, GLint border,
166 GLsizei imageSize, const GLvoid *data);
167
168
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
191