home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mesa5.zip / mesa5src.zip / MesaDLL / teximage.h < prev    next >
C/C++ Source or Header  |  2002-10-18  |  7KB  |  207 lines

  1. /* $Id: teximage.h,v 1.22 2002/10/18 18:03:07 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.5
  6.  *
  7.  * Copyright (C) 1999-2001  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 "mtypes.h"
  33.  
  34.  
  35. /*** Internal functions ***/
  36.  
  37.  
  38. extern GLint
  39. _mesa_base_tex_format( GLcontext *ctx, GLint format );
  40.  
  41.  
  42. extern struct gl_texture_image *
  43. _mesa_alloc_texture_image( void );
  44.  
  45.  
  46. extern void
  47. _mesa_free_texture_image( struct gl_texture_image *teximage );
  48.  
  49.  
  50. extern void
  51. _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
  52.                            struct gl_texture_image *img,
  53.                            GLsizei width, GLsizei height, GLsizei depth,
  54.                            GLint border, GLenum internalFormat);
  55.  
  56.  
  57. extern void
  58. _mesa_set_tex_image(struct gl_texture_object *tObj,
  59.                     GLenum target, GLint level,
  60.                     struct gl_texture_image *texImage);
  61.  
  62.  
  63. extern struct gl_texture_object *
  64. _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
  65.                         GLenum target);
  66.  
  67.  
  68. extern struct gl_texture_image *
  69. _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
  70.                        GLenum target, GLint level);
  71.  
  72.  
  73. extern GLint
  74. _mesa_max_texture_levels(GLcontext *ctx, GLenum target);
  75.  
  76.  
  77. /*** API entry point functions ***/
  78.  
  79.  
  80. extern void
  81. _mesa_TexImage1D( GLenum target, GLint level, GLint internalformat,
  82.                   GLsizei width, GLint border,
  83.                   GLenum format, GLenum type, const GLvoid *pixels );
  84.  
  85.  
  86. extern void
  87. _mesa_TexImage2D( GLenum target, GLint level, GLint internalformat,
  88.                   GLsizei width, GLsizei height, GLint border,
  89.                   GLenum format, GLenum type, const GLvoid *pixels );
  90.  
  91.  
  92. extern void
  93. _mesa_TexImage3D( GLenum target, GLint level, GLint internalformat,
  94.                   GLsizei width, GLsizei height, GLsizei depth, GLint border,
  95.                   GLenum format, GLenum type, const GLvoid *pixels );
  96.  
  97.  
  98. extern void
  99. _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat,
  100.                      GLsizei width, GLsizei height, GLsizei depth,
  101.                      GLint border, GLenum format, GLenum type,
  102.                      const GLvoid *pixels );
  103.  
  104.  
  105. extern void
  106. _mesa_GetTexImage( GLenum target, GLint level,
  107.                    GLenum format, GLenum type, GLvoid *pixels );
  108.  
  109.  
  110. extern void
  111. _mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset,
  112.                      GLsizei width,
  113.                      GLenum format, GLenum type,
  114.                      const GLvoid *pixels );
  115.  
  116.  
  117. extern void
  118. _mesa_TexSubImage2D( GLenum target, GLint level,
  119.                      GLint xoffset, GLint yoffset,
  120.                      GLsizei width, GLsizei height,
  121.                      GLenum format, GLenum type,
  122.                      const GLvoid *pixels );
  123.  
  124.  
  125. extern void
  126. _mesa_TexSubImage3D( GLenum target, GLint level,
  127.                      GLint xoffset, GLint yoffset, GLint zoffset,
  128.                      GLsizei width, GLsizei height, GLsizei depth,
  129.                      GLenum format, GLenum type,
  130.                      const GLvoid *pixels );
  131.  
  132.  
  133. extern void
  134. _mesa_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat,
  135.                       GLint x, GLint y, GLsizei width, GLint border );
  136.  
  137.  
  138. extern void
  139. _mesa_CopyTexImage2D( GLenum target, GLint level,
  140.                       GLenum internalformat, GLint x, GLint y,
  141.                       GLsizei width, GLsizei height, GLint border );
  142.  
  143.  
  144. extern void
  145. _mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset,
  146.                          GLint x, GLint y, GLsizei width );
  147.  
  148.  
  149. extern void
  150. _mesa_CopyTexSubImage2D( GLenum target, GLint level,
  151.                          GLint xoffset, GLint yoffset,
  152.                          GLint x, GLint y, GLsizei width, GLsizei height );
  153.  
  154.  
  155. extern void
  156. _mesa_CopyTexSubImage3D( GLenum target, GLint level,
  157.                          GLint xoffset, GLint yoffset, GLint zoffset,
  158.                          GLint x, GLint y, GLsizei width, GLsizei height );
  159.  
  160.  
  161.  
  162. extern void
  163. _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
  164.                               GLenum internalformat, GLsizei width,
  165.                               GLint border, GLsizei imageSize,
  166.                               const GLvoid *data);
  167.  
  168. extern void
  169. _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
  170.                               GLenum internalformat, GLsizei width,
  171.                               GLsizei height, GLint border, GLsizei imageSize,
  172.                               const GLvoid *data);
  173.  
  174. extern void
  175. _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
  176.                               GLenum internalformat, GLsizei width,
  177.                               GLsizei height, GLsizei depth, GLint border,
  178.                               GLsizei imageSize, const GLvoid *data);
  179.  
  180. #ifdef VMS
  181. #define _mesa_CompressedTexSubImage1DARB _mesa_CompressedTexSubImage1DAR
  182. #define _mesa_CompressedTexSubImage2DARB _mesa_CompressedTexSubImage2DAR
  183. #define _mesa_CompressedTexSubImage3DARB _mesa_CompressedTexSubImage3DAR
  184. #endif
  185. extern void
  186. _mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
  187.                                  GLsizei width, GLenum format,
  188.                                  GLsizei imageSize, const GLvoid *data);
  189.  
  190. extern void
  191. _mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
  192.                                  GLint yoffset, GLsizei width, GLsizei height,
  193.                                  GLenum format, GLsizei imageSize,
  194.                                  const GLvoid *data);
  195.  
  196. extern void
  197. _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
  198.                                  GLint yoffset, GLint zoffset, GLsizei width,
  199.                                  GLsizei height, GLsizei depth, GLenum format,
  200.                                  GLsizei imageSize, const GLvoid *data);
  201.  
  202. extern void
  203. _mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
  204.  
  205.  
  206. #endif
  207.