1 /* $Id: teximage.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
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:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
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.
38 /*** Internal functions ***/
41 extern struct gl_texture_image
*gl_alloc_texture_image( void );
44 extern void gl_free_texture_image( struct gl_texture_image
*teximage
);
47 extern struct gl_image
*
48 gl_unpack_texsubimage( GLcontext
*ctx
, GLint width
, GLint height
,
49 GLenum format
, GLenum type
, const GLvoid
*pixels
);
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
);
57 extern struct gl_texture_image
*
58 gl_unpack_texture( GLcontext
*ctx
,
63 GLsizei width
, GLsizei height
,
65 GLenum format
, GLenum type
,
66 const GLvoid
*pixels
);
68 extern struct gl_texture_image
*
69 gl_unpack_texture3D( GLcontext
*ctx
,
74 GLsizei width
, GLsizei height
, GLsizei depth
,
76 GLenum format
, GLenum type
,
77 const GLvoid
*pixels
);
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
);
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
);
92 extern void gl_tex_image_3D( GLcontext
*ctx
,
93 GLenum target
, GLint level
, GLint internalformat
,
94 GLsizei width
, GLint height
, GLint depth
,
96 GLenum format
, GLenum type
,
97 const GLvoid
*pixels
);
100 /*** API entry points ***/
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
);
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
);
116 extern void gl_TexImage3DEXT( GLcontext
*ctx
,
117 GLenum target
, GLint level
, GLint internalformat
,
118 GLsizei width
, GLsizei height
, GLsizei depth
,
120 GLenum format
, GLenum type
,
121 struct gl_image
*teximage
);
124 extern void gl_GetTexImage( GLcontext
*ctx
, GLenum target
, GLint level
,
125 GLenum format
, GLenum type
, GLvoid
*pixels
);
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
);
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
);
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
);
151 extern void gl_CopyTexImage1D( GLcontext
*ctx
,
152 GLenum target
, GLint level
,
153 GLenum internalformat
,
155 GLsizei width
, GLint border
);
158 extern void gl_CopyTexImage2D( GLcontext
*ctx
,
159 GLenum target
, GLint level
,
160 GLenum internalformat
, GLint x
, GLint y
,
161 GLsizei width
, GLsizei height
,
165 extern void gl_CopyTexSubImage1D( GLcontext
*ctx
,
166 GLenum target
, GLint level
,
167 GLint xoffset
, GLint x
, GLint y
,
171 extern void gl_CopyTexSubImage2D( GLcontext
*ctx
,
172 GLenum target
, GLint level
,
173 GLint xoffset
, GLint yoffset
,
175 GLsizei width
, GLsizei height
);
178 extern void gl_CopyTexSubImage3DEXT( GLcontext
*ctx
,
179 GLenum target
, GLint level
,
180 GLint xoffset
, GLint yoffset
,
183 GLsizei width
, GLsizei height
);