Initial revision
[mesa.git] / src / mesa / main / teximage.h
1 /* $Id: teximage.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.1
6 *
7 * Copyright (C) 1999 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
29
30
31 #ifndef TEXIMAGE_H
32 #define TEXIMAGE_H
33
34
35 #include "types.h"
36
37
38 /*** Internal functions ***/
39
40
41 extern struct gl_texture_image *gl_alloc_texture_image( void );
42
43
44 extern void gl_free_texture_image( struct gl_texture_image *teximage );
45
46
47 extern struct gl_image *
48 gl_unpack_texsubimage( GLcontext *ctx, GLint width, GLint height,
49 GLenum format, GLenum type, const GLvoid *pixels );
50
51
52 extern struct gl_image *
53 gl_unpack_texsubimage3D( GLcontext *ctx, GLint width, GLint height,GLint depth,
54 GLenum format, GLenum type, const GLvoid *pixels );
55
56
57 extern struct gl_texture_image *
58 gl_unpack_texture( GLcontext *ctx,
59 GLint dimensions,
60 GLenum target,
61 GLint level,
62 GLint internalformat,
63 GLsizei width, GLsizei height,
64 GLint border,
65 GLenum format, GLenum type,
66 const GLvoid *pixels );
67
68 extern struct gl_texture_image *
69 gl_unpack_texture3D( GLcontext *ctx,
70 GLint dimensions,
71 GLenum target,
72 GLint level,
73 GLint internalformat,
74 GLsizei width, GLsizei height, GLsizei depth,
75 GLint border,
76 GLenum format, GLenum type,
77 const GLvoid *pixels );
78
79
80 extern void gl_tex_image_1D( GLcontext *ctx,
81 GLenum target, GLint level, GLint internalformat,
82 GLsizei width, GLint border, GLenum format,
83 GLenum type, const GLvoid *pixels );
84
85
86 extern void gl_tex_image_2D( GLcontext *ctx,
87 GLenum target, GLint level, GLint internalformat,
88 GLsizei width, GLint height, GLint border,
89 GLenum format, GLenum type,
90 const GLvoid *pixels );
91
92 extern void gl_tex_image_3D( GLcontext *ctx,
93 GLenum target, GLint level, GLint internalformat,
94 GLsizei width, GLint height, GLint depth,
95 GLint border,
96 GLenum format, GLenum type,
97 const GLvoid *pixels );
98
99
100 /*** API entry points ***/
101
102
103 extern void gl_TexImage1D( GLcontext *ctx,
104 GLenum target, GLint level, GLint internalformat,
105 GLsizei width, GLint border, GLenum format,
106 GLenum type, struct gl_image *teximage );
107
108
109 extern void gl_TexImage2D( GLcontext *ctx,
110 GLenum target, GLint level, GLint internalformat,
111 GLsizei width, GLsizei height, GLint border,
112 GLenum format, GLenum type,
113 struct gl_image *teximage );
114
115
116 extern void gl_TexImage3DEXT( GLcontext *ctx,
117 GLenum target, GLint level, GLint internalformat,
118 GLsizei width, GLsizei height, GLsizei depth,
119 GLint border,
120 GLenum format, GLenum type,
121 struct gl_image *teximage );
122
123
124 extern void gl_GetTexImage( GLcontext *ctx, GLenum target, GLint level,
125 GLenum format, GLenum type, GLvoid *pixels );
126
127
128
129 extern void gl_TexSubImage1D( GLcontext *ctx,
130 GLenum target, GLint level, GLint xoffset,
131 GLsizei width, GLenum format, GLenum type,
132 struct gl_image *image );
133
134
135 extern void gl_TexSubImage2D( GLcontext *ctx,
136 GLenum target, GLint level,
137 GLint xoffset, GLint yoffset,
138 GLsizei width, GLsizei height,
139 GLenum format, GLenum type,
140 struct gl_image *image );
141
142
143 extern void gl_TexSubImage3DEXT( GLcontext *ctx,
144 GLenum target, GLint level,
145 GLint xoffset, GLint yoffset, GLint zoffset,
146 GLsizei width, GLsizei height, GLsizei depth,
147 GLenum format, GLenum type,
148 struct gl_image *image );
149
150
151 extern void gl_CopyTexImage1D( GLcontext *ctx,
152 GLenum target, GLint level,
153 GLenum internalformat,
154 GLint x, GLint y,
155 GLsizei width, GLint border );
156
157
158 extern void gl_CopyTexImage2D( GLcontext *ctx,
159 GLenum target, GLint level,
160 GLenum internalformat, GLint x, GLint y,
161 GLsizei width, GLsizei height,
162 GLint border );
163
164
165 extern void gl_CopyTexSubImage1D( GLcontext *ctx,
166 GLenum target, GLint level,
167 GLint xoffset, GLint x, GLint y,
168 GLsizei width );
169
170
171 extern void gl_CopyTexSubImage2D( GLcontext *ctx,
172 GLenum target, GLint level,
173 GLint xoffset, GLint yoffset,
174 GLint x, GLint y,
175 GLsizei width, GLsizei height );
176
177
178 extern void gl_CopyTexSubImage3DEXT( GLcontext *ctx,
179 GLenum target, GLint level,
180 GLint xoffset, GLint yoffset,
181 GLint zoffset,
182 GLint x, GLint y,
183 GLsizei width, GLsizei height );
184
185 #endif
186