Merge Jose's documentation and core Mesa changes from embedded branch
[mesa.git] / src / mesa / main / texstore.h
1 /**
2 * \file texstore.h
3 * Texture image storage.
4 *
5 * \author Brian Paul
6 */
7
8 /*
9 * Mesa 3-D graphics library
10 * Version: 5.1
11 *
12 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
13 *
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:
20 *
21 * The above copyright notice and this permission notice shall be included
22 * in all copies or substantial portions of the Software.
23 *
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.
30 */
31
32
33 #ifndef TEXSTORE_H
34 #define TEXSTORE_H
35
36
37 #include "mtypes.h"
38
39
40 extern void
41 _mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions,
42 GLenum baseInternalFormat,
43 const struct gl_texture_format *texDestFormat,
44 GLvoid *texDestAddr,
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);
51
52
53 extern void
54 _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
55 GLint internalFormat,
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);
61
62
63 extern void
64 _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
65 GLint internalFormat,
66 GLint width, GLint height, GLint border,
67 GLenum format, GLenum type, const void *pixels,
68 const struct gl_pixelstore_attrib *packing,
69 struct gl_texture_object *texObj,
70 struct gl_texture_image *texImage);
71
72
73 extern void
74 _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
75 GLint internalFormat,
76 GLint width, GLint height, GLint depth, GLint border,
77 GLenum format, GLenum type, const void *pixels,
78 const struct gl_pixelstore_attrib *packing,
79 struct gl_texture_object *texObj,
80 struct gl_texture_image *texImage);
81
82
83 extern void
84 _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
85 GLint xoffset, GLint width,
86 GLenum format, GLenum type, const void *pixels,
87 const struct gl_pixelstore_attrib *packing,
88 struct gl_texture_object *texObj,
89 struct gl_texture_image *texImage);
90
91
92 extern void
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 void *pixels,
97 const struct gl_pixelstore_attrib *packing,
98 struct gl_texture_object *texObj,
99 struct gl_texture_image *texImage);
100
101
102 extern void
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 void *pixels,
107 const struct gl_pixelstore_attrib *packing,
108 struct gl_texture_object *texObj,
109 struct gl_texture_image *texImage);
110
111
112 extern void
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);
119
120 extern void
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);
127
128 extern void
129 _mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level,
130 GLint internalFormat,
131 GLint width, GLint height, GLint depth,
132 GLint border,
133 GLsizei imageSize, const GLvoid *data,
134 struct gl_texture_object *texObj,
135 struct gl_texture_image *texImage);
136
137
138 extern void
139 _mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target,
140 GLint level,
141 GLint xoffset, GLsizei width,
142 GLenum format,
143 GLsizei imageSize, const GLvoid *data,
144 struct gl_texture_object *texObj,
145 struct gl_texture_image *texImage);
146
147 extern void
148 _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
149 GLint level,
150 GLint xoffset, GLint yoffset,
151 GLsizei width, GLsizei height,
152 GLenum format,
153 GLsizei imageSize, const GLvoid *data,
154 struct gl_texture_object *texObj,
155 struct gl_texture_image *texImage);
156
157 extern void
158 _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
159 GLint level,
160 GLint xoffset, GLint yoffset, GLint zoffset,
161 GLsizei width, GLsizei height, GLsizei depth,
162 GLenum format,
163 GLsizei imageSize, const GLvoid *data,
164 struct gl_texture_object *texObj,
165 struct gl_texture_image *texImage);
166
167
168 extern void
169 _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
170 const struct gl_texture_unit *texUnit,
171 struct gl_texture_object *texObj);
172
173 #endif