texstore.h revision d5bbbd41c431ad93c0867d5b0b234426d8570499
1/* $Id: texstore.h,v 1.10 2002/09/16 17:57:14 brianp Exp $ */
2
3/*
4 * Mesa 3-D graphics library
5 * Version:  4.1
6 *
7 * Copyright (C) 1999-2002  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 * Authors:
29 *   Brian Paul
30 */
31
32
33#ifndef TEXSTORE_H
34#define TEXSTORE_H
35
36
37#include "mtypes.h"
38
39
40extern 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
53extern 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
63extern 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
73extern 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
83extern 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
92extern 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
102extern 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
112extern 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
120extern 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
128extern 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
138extern void
139_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target,
140                              GLint level, void *image,
141                              const struct gl_texture_object *texObj,
142                              struct gl_texture_image *texImage);
143
144
145extern GLboolean
146_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
147                         GLint internalFormat, GLenum format, GLenum type,
148                         GLint width, GLint height, GLint depth, GLint border);
149
150
151extern void
152_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
153                      const struct gl_texture_unit *texUnit,
154                      struct gl_texture_object *texObj);
155
156#endif
157