teximage.h revision 021a525616bef2bafc8f60edc193b975ed2b0efa
1/* $Id: teximage.h,v 1.6 2000/03/27 17:54:17 brianp Exp $ */ 2 3/* 4 * Mesa 3-D graphics library 5 * Version: 3.3 6 * 7 * Copyright (C) 1999-2000 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#ifndef TEXIMAGE_H 29#define TEXIMAGE_H 30 31 32#include "types.h" 33 34 35/*** Internal functions ***/ 36 37 38extern GLint 39_mesa_base_tex_format( GLint format ); 40 41 42extern struct gl_texture_image * 43_mesa_alloc_texture_image( void ); 44 45 46extern void 47_mesa_free_texture_image( struct gl_texture_image *teximage ); 48 49 50extern void 51_mesa_get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level, 52 const struct gl_texture_object *texObj ); 53 54 55/*** API entry point functions ***/ 56 57 58extern void 59_mesa_TexImage1D( GLenum target, GLint level, GLint internalformat, 60 GLsizei width, GLint border, 61 GLenum format, GLenum type, const GLvoid *pixels ); 62 63 64extern void 65_mesa_TexImage2D( GLenum target, GLint level, GLint internalformat, 66 GLsizei width, GLsizei height, GLint border, 67 GLenum format, GLenum type, const GLvoid *pixels ); 68 69 70extern void 71_mesa_TexImage3D( GLenum target, GLint level, GLint internalformat, 72 GLsizei width, GLsizei height, GLsizei depth, GLint border, 73 GLenum format, GLenum type, const GLvoid *pixels ); 74 75 76extern void 77_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat, 78 GLsizei width, GLsizei height, GLsizei depth, 79 GLint border, GLenum format, GLenum type, 80 const GLvoid *pixels ); 81 82 83extern void 84_mesa_GetTexImage( GLenum target, GLint level, 85 GLenum format, GLenum type, GLvoid *pixels ); 86 87 88extern void 89_mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset, 90 GLsizei width, 91 GLenum format, GLenum type, 92 const GLvoid *pixels ); 93 94 95extern void 96_mesa_TexSubImage2D( GLenum target, GLint level, 97 GLint xoffset, GLint yoffset, 98 GLsizei width, GLsizei height, 99 GLenum format, GLenum type, 100 const GLvoid *pixels ); 101 102 103extern void 104_mesa_TexSubImage3D( GLenum target, GLint level, 105 GLint xoffset, GLint yoffset, GLint zoffset, 106 GLsizei width, GLsizei height, GLsizei depth, 107 GLenum format, GLenum type, 108 const GLvoid *pixels ); 109 110 111extern void 112_mesa_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat, 113 GLint x, GLint y, GLsizei width, GLint border ); 114 115 116extern void 117_mesa_CopyTexImage2D( GLenum target, GLint level, 118 GLenum internalformat, GLint x, GLint y, 119 GLsizei width, GLsizei height, GLint border ); 120 121 122extern void 123_mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, 124 GLint x, GLint y, GLsizei width ); 125 126 127extern void 128_mesa_CopyTexSubImage2D( GLenum target, GLint level, 129 GLint xoffset, GLint yoffset, 130 GLint x, GLint y, GLsizei width, GLsizei height ); 131 132 133extern void 134_mesa_CopyTexSubImage3D( GLenum target, GLint level, 135 GLint xoffset, GLint yoffset, GLint zoffset, 136 GLint x, GLint y, GLsizei width, GLsizei height ); 137 138#endif 139 140