3 * Texture image storage.
9 * Mesa 3-D graphics library
12 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
14 * Permission is hereby granted, free of charge, to any person obtaining a
15 * copy of this software and associated documentation files (the "Software"),
16 * to deal in the Software without restriction, including without limitation
17 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 * and/or sell copies of the Software, and to permit persons to whom the
19 * Software is furnished to do so, subject to the following conditions:
21 * The above copyright notice and this permission notice shall be included
22 * in all copies or substantial portions of the Software.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
28 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41 _mesa_transfer_teximage(GLcontext
*ctx
, GLuint dimensions
,
42 GLenum baseInternalFormat
,
43 const struct gl_texture_format
*texDestFormat
,
45 GLint srcWidth
, GLint srcHeight
, GLint srcDepth
,
46 GLint dstXoffset
, GLint dstYoffset
, GLint dstZoffset
,
47 GLint dstRowStride
, GLint dstImageStride
,
48 GLenum srcFormat
, GLenum srcType
,
49 const GLvoid
*srcAddr
,
50 const struct gl_pixelstore_attrib
*srcPacking
);
54 _mesa_store_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
56 GLint width
, GLint border
,
57 GLenum format
, GLenum type
, const GLvoid
*pixels
,
58 const struct gl_pixelstore_attrib
*packing
,
59 struct gl_texture_object
*texObj
,
60 struct gl_texture_image
*texImage
);
64 _mesa_store_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
66 GLint width
, GLint height
, GLint border
,
67 GLenum format
, GLenum type
, const GLvoid
*pixels
,
68 const struct gl_pixelstore_attrib
*packing
,
69 struct gl_texture_object
*texObj
,
70 struct gl_texture_image
*texImage
);
74 _mesa_store_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
76 GLint width
, GLint height
, GLint depth
, GLint border
,
77 GLenum format
, GLenum type
, const GLvoid
*pixels
,
78 const struct gl_pixelstore_attrib
*packing
,
79 struct gl_texture_object
*texObj
,
80 struct gl_texture_image
*texImage
);
84 _mesa_store_texsubimage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
85 GLint xoffset
, GLint width
,
86 GLenum format
, GLenum type
, const GLvoid
*pixels
,
87 const struct gl_pixelstore_attrib
*packing
,
88 struct gl_texture_object
*texObj
,
89 struct gl_texture_image
*texImage
);
93 _mesa_store_texsubimage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
94 GLint xoffset
, GLint yoffset
,
95 GLint width
, GLint height
,
96 GLenum format
, GLenum type
, const GLvoid
*pixels
,
97 const struct gl_pixelstore_attrib
*packing
,
98 struct gl_texture_object
*texObj
,
99 struct gl_texture_image
*texImage
);
103 _mesa_store_texsubimage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
104 GLint xoffset
, GLint yoffset
, GLint zoffset
,
105 GLint width
, GLint height
, GLint depth
,
106 GLenum format
, GLenum type
, const GLvoid
*pixels
,
107 const struct gl_pixelstore_attrib
*packing
,
108 struct gl_texture_object
*texObj
,
109 struct gl_texture_image
*texImage
);
113 _mesa_store_compressed_teximage1d(GLcontext
*ctx
, GLenum target
, GLint level
,
114 GLint internalFormat
,
115 GLint width
, GLint border
,
116 GLsizei imageSize
, const GLvoid
*data
,
117 struct gl_texture_object
*texObj
,
118 struct gl_texture_image
*texImage
);
121 _mesa_store_compressed_teximage2d(GLcontext
*ctx
, GLenum target
, GLint level
,
122 GLint internalFormat
,
123 GLint width
, GLint height
, GLint border
,
124 GLsizei imageSize
, const GLvoid
*data
,
125 struct gl_texture_object
*texObj
,
126 struct gl_texture_image
*texImage
);
129 _mesa_store_compressed_teximage3d(GLcontext
*ctx
, GLenum target
, GLint level
,
130 GLint internalFormat
,
131 GLint width
, GLint height
, GLint depth
,
133 GLsizei imageSize
, const GLvoid
*data
,
134 struct gl_texture_object
*texObj
,
135 struct gl_texture_image
*texImage
);
139 _mesa_store_compressed_texsubimage1d(GLcontext
*ctx
, GLenum target
,
141 GLint xoffset
, GLsizei width
,
143 GLsizei imageSize
, const GLvoid
*data
,
144 struct gl_texture_object
*texObj
,
145 struct gl_texture_image
*texImage
);
148 _mesa_store_compressed_texsubimage2d(GLcontext
*ctx
, GLenum target
,
150 GLint xoffset
, GLint yoffset
,
151 GLsizei width
, GLsizei height
,
153 GLsizei imageSize
, const GLvoid
*data
,
154 struct gl_texture_object
*texObj
,
155 struct gl_texture_image
*texImage
);
158 _mesa_store_compressed_texsubimage3d(GLcontext
*ctx
, GLenum target
,
160 GLint xoffset
, GLint yoffset
, GLint zoffset
,
161 GLsizei width
, GLsizei height
, GLsizei depth
,
163 GLsizei imageSize
, const GLvoid
*data
,
164 struct gl_texture_object
*texObj
,
165 struct gl_texture_image
*texImage
);
169 _mesa_generate_mipmap(GLcontext
*ctx
, GLenum target
,
170 const struct gl_texture_unit
*texUnit
,
171 struct gl_texture_object
*texObj
);