texstore.h revision f959f6e1dc27c71fc0ccc56e09b29101b3bf3b97
1/* 2 * Mesa 3-D graphics library 3 * Version: 6.1 4 * 5 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), 9 * to deal in the Software without restriction, including without limitation 10 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * and/or sell copies of the Software, and to permit persons to whom the 12 * Software is furnished to do so, subject to the following conditions: 13 * 14 * The above copyright notice and this permission notice shall be included 15 * in all copies or substantial portions of the Software. 16 * 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 */ 24 25 26/** 27 * \file texstore.h 28 * Texture image storage routines. 29 * 30 * \author Brian Paul 31 */ 32 33 34#ifndef TEXSTORE_H 35#define TEXSTORE_H 36 37 38#include "mtypes.h" 39 40/*** NEWTEXSTORE ***/ 41 42/* Macro just to save some typing */ 43#define STORE_PARAMS \ 44 GLcontext *ctx, GLuint dims, \ 45 GLenum baseInternalFormat, \ 46 const struct gl_texture_format *dstFormat, \ 47 GLvoid *dstAddr, \ 48 GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \ 49 GLint dstRowStride, GLint dstImageStride, \ 50 GLint srcWidth, GLint srcHeight, GLint srcDepth, \ 51 GLenum srcFormat, GLenum srcType, \ 52 const GLvoid *srcAddr, \ 53 const struct gl_pixelstore_attrib *srcPacking 54 55 56extern GLboolean _mesa_texstore_rgba(STORE_PARAMS); 57extern GLboolean _mesa_texstore_color_index(STORE_PARAMS); 58extern GLboolean _mesa_texstore_depth_component16(STORE_PARAMS); 59extern GLboolean _mesa_texstore_depth_component_float32(STORE_PARAMS); 60extern GLboolean _mesa_texstore_rgb565(STORE_PARAMS); 61extern GLboolean _mesa_texstore_rgba8888(STORE_PARAMS); 62extern GLboolean _mesa_texstore_argb8888(STORE_PARAMS); 63extern GLboolean _mesa_texstore_rgb888(STORE_PARAMS); 64extern GLboolean _mesa_texstore_argb4444(STORE_PARAMS); 65extern GLboolean _mesa_texstore_argb1555(STORE_PARAMS); 66extern GLboolean _mesa_texstore_al88(STORE_PARAMS); 67extern GLboolean _mesa_texstore_rgb332(STORE_PARAMS); 68extern GLboolean _mesa_texstore_a8(STORE_PARAMS); 69extern GLboolean _mesa_texstore_ci8(STORE_PARAMS); 70extern GLboolean _mesa_texstore_ycbcr(STORE_PARAMS); 71extern GLboolean _mesa_texstore_rgba_float32(STORE_PARAMS); 72extern GLboolean _mesa_texstore_rgba_float16(STORE_PARAMS); 73 74#if !NEWTEXSTORE 75 76extern void 77_mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions, 78 GLenum baseInternalFormat, 79 const struct gl_texture_format *texDestFormat, 80 GLvoid *texDestAddr, 81 GLint srcWidth, GLint srcHeight, GLint srcDepth, 82 GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, 83 GLint dstRowStride, GLint dstImageStride, 84 GLenum srcFormat, GLenum srcType, 85 const GLvoid *srcAddr, 86 const struct gl_pixelstore_attrib *srcPacking); 87 88#endif /* NEWTEXSTORE */ 89 90 91extern void 92_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, 93 GLint internalFormat, 94 GLint width, GLint border, 95 GLenum format, GLenum type, const GLvoid *pixels, 96 const struct gl_pixelstore_attrib *packing, 97 struct gl_texture_object *texObj, 98 struct gl_texture_image *texImage); 99 100 101extern void 102_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, 103 GLint internalFormat, 104 GLint width, GLint height, GLint border, 105 GLenum format, GLenum type, const GLvoid *pixels, 106 const struct gl_pixelstore_attrib *packing, 107 struct gl_texture_object *texObj, 108 struct gl_texture_image *texImage); 109 110 111extern void 112_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, 113 GLint internalFormat, 114 GLint width, GLint height, GLint depth, GLint border, 115 GLenum format, GLenum type, const GLvoid *pixels, 116 const struct gl_pixelstore_attrib *packing, 117 struct gl_texture_object *texObj, 118 struct gl_texture_image *texImage); 119 120 121extern void 122_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, 123 GLint xoffset, GLint width, 124 GLenum format, GLenum type, const GLvoid *pixels, 125 const struct gl_pixelstore_attrib *packing, 126 struct gl_texture_object *texObj, 127 struct gl_texture_image *texImage); 128 129 130extern void 131_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, 132 GLint xoffset, GLint yoffset, 133 GLint width, GLint height, 134 GLenum format, GLenum type, const GLvoid *pixels, 135 const struct gl_pixelstore_attrib *packing, 136 struct gl_texture_object *texObj, 137 struct gl_texture_image *texImage); 138 139 140extern void 141_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, 142 GLint xoffset, GLint yoffset, GLint zoffset, 143 GLint width, GLint height, GLint depth, 144 GLenum format, GLenum type, const GLvoid *pixels, 145 const struct gl_pixelstore_attrib *packing, 146 struct gl_texture_object *texObj, 147 struct gl_texture_image *texImage); 148 149 150extern void 151_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, 152 GLint internalFormat, 153 GLint width, GLint border, 154 GLsizei imageSize, const GLvoid *data, 155 struct gl_texture_object *texObj, 156 struct gl_texture_image *texImage); 157 158extern void 159_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, 160 GLint internalFormat, 161 GLint width, GLint height, GLint border, 162 GLsizei imageSize, const GLvoid *data, 163 struct gl_texture_object *texObj, 164 struct gl_texture_image *texImage); 165 166extern void 167_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, 168 GLint internalFormat, 169 GLint width, GLint height, GLint depth, 170 GLint border, 171 GLsizei imageSize, const GLvoid *data, 172 struct gl_texture_object *texObj, 173 struct gl_texture_image *texImage); 174 175 176extern void 177_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, 178 GLint level, 179 GLint xoffset, GLsizei width, 180 GLenum format, 181 GLsizei imageSize, const GLvoid *data, 182 struct gl_texture_object *texObj, 183 struct gl_texture_image *texImage); 184 185extern void 186_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, 187 GLint level, 188 GLint xoffset, GLint yoffset, 189 GLsizei width, GLsizei height, 190 GLenum format, 191 GLsizei imageSize, const GLvoid *data, 192 struct gl_texture_object *texObj, 193 struct gl_texture_image *texImage); 194 195extern void 196_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, 197 GLint level, 198 GLint xoffset, GLint yoffset, GLint zoffset, 199 GLsizei width, GLsizei height, GLsizei depth, 200 GLenum format, 201 GLsizei imageSize, const GLvoid *data, 202 struct gl_texture_object *texObj, 203 struct gl_texture_image *texImage); 204 205 206extern void 207_mesa_generate_mipmap(GLcontext *ctx, GLenum target, 208 const struct gl_texture_unit *texUnit, 209 struct gl_texture_object *texObj); 210 211#endif 212