Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Mesa 3-D graphics library
  3.  *
  4.  * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
  5.  * Copyright (C) 1999-2010  VMware, Inc.  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.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  21.  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  22.  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23.  * OTHER DEALINGS IN THE SOFTWARE.
  24.  */
  25.  
  26.  
  27. #ifndef PACK_H
  28. #define PACK_H
  29.  
  30.  
  31. #include "mtypes.h"
  32.  
  33.  
  34. extern void
  35. _mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32],
  36.                              const struct gl_pixelstore_attrib *unpacking);
  37.  
  38.  
  39. extern void
  40. _mesa_pack_polygon_stipple(const GLuint pattern[32], GLubyte *dest,
  41.                            const struct gl_pixelstore_attrib *packing);
  42.  
  43.  
  44. extern GLvoid *
  45. _mesa_unpack_bitmap(GLint width, GLint height, const GLubyte *pixels,
  46.                     const struct gl_pixelstore_attrib *packing);
  47.  
  48. extern void
  49. _mesa_pack_bitmap(GLint width, GLint height, const GLubyte *source,
  50.                   GLubyte *dest, const struct gl_pixelstore_attrib *packing);
  51.  
  52.  
  53. extern void
  54. _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n,
  55.                            GLfloat rgba[][4],
  56.                            GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
  57.                            const struct gl_pixelstore_attrib *dstPacking,
  58.                            GLbitfield transferOps);
  59.  
  60.  
  61. extern void
  62. _mesa_unpack_color_span_ubyte(struct gl_context *ctx,
  63.                              GLuint n, GLenum dstFormat, GLubyte dest[],
  64.                              GLenum srcFormat, GLenum srcType,
  65.                              const GLvoid *source,
  66.                              const struct gl_pixelstore_attrib *srcPacking,
  67.                              GLbitfield transferOps);
  68.  
  69.  
  70. extern void
  71. _mesa_unpack_color_span_float(struct gl_context *ctx,
  72.                               GLuint n, GLenum dstFormat, GLfloat dest[],
  73.                               GLenum srcFormat, GLenum srcType,
  74.                               const GLvoid *source,
  75.                               const struct gl_pixelstore_attrib *srcPacking,
  76.                               GLbitfield transferOps);
  77.  
  78. extern void
  79. _mesa_unpack_color_span_uint(struct gl_context *ctx,
  80.                              GLuint n, GLenum dstFormat, GLuint *dest,
  81.                              GLenum srcFormat, GLenum srcType,
  82.                              const GLvoid *source,
  83.                              const struct gl_pixelstore_attrib *srcPacking);
  84.  
  85. extern void
  86. _mesa_unpack_dudv_span_byte(struct gl_context *ctx,
  87.                             GLuint n, GLenum dstFormat, GLbyte dest[],
  88.                             GLenum srcFormat, GLenum srcType,
  89.                             const GLvoid *source,
  90.                             const struct gl_pixelstore_attrib *srcPacking,
  91.                             GLbitfield transferOps);
  92.  
  93. extern void
  94. _mesa_unpack_index_span(struct gl_context *ctx, GLuint n,
  95.                         GLenum dstType, GLvoid *dest,
  96.                         GLenum srcType, const GLvoid *source,
  97.                         const struct gl_pixelstore_attrib *srcPacking,
  98.                         GLbitfield transferOps);
  99.  
  100.  
  101. extern void
  102. _mesa_pack_index_span(struct gl_context *ctx, GLuint n,
  103.                       GLenum dstType, GLvoid *dest, const GLuint *source,
  104.                       const struct gl_pixelstore_attrib *dstPacking,
  105.                       GLbitfield transferOps);
  106.  
  107.  
  108. extern void
  109. _mesa_unpack_stencil_span(struct gl_context *ctx, GLuint n,
  110.                           GLenum dstType, GLvoid *dest,
  111.                           GLenum srcType, const GLvoid *source,
  112.                           const struct gl_pixelstore_attrib *srcPacking,
  113.                           GLbitfield transferOps);
  114.  
  115. extern void
  116. _mesa_pack_stencil_span(struct gl_context *ctx, GLuint n,
  117.                         GLenum dstType, GLvoid *dest, const GLubyte *source,
  118.                         const struct gl_pixelstore_attrib *dstPacking);
  119.  
  120.  
  121. extern void
  122. _mesa_unpack_depth_span(struct gl_context *ctx, GLuint n,
  123.                         GLenum dstType, GLvoid *dest, GLuint depthMax,
  124.                         GLenum srcType, const GLvoid *source,
  125.                         const struct gl_pixelstore_attrib *srcPacking);
  126.  
  127. extern void
  128. _mesa_pack_depth_span(struct gl_context *ctx, GLuint n, GLvoid *dest,
  129.                       GLenum dstType, const GLfloat *depthSpan,
  130.                       const struct gl_pixelstore_attrib *dstPacking);
  131.  
  132.  
  133. extern void
  134. _mesa_pack_depth_stencil_span(struct gl_context *ctx,GLuint n,
  135.                               GLenum dstType, GLuint *dest,
  136.                               const GLfloat *depthVals,
  137.                               const GLubyte *stencilVals,
  138.                               const struct gl_pixelstore_attrib *dstPacking);
  139.  
  140.  
  141. extern void *
  142. _mesa_unpack_image(GLuint dimensions,
  143.                    GLsizei width, GLsizei height, GLsizei depth,
  144.                    GLenum format, GLenum type, const GLvoid *pixels,
  145.                    const struct gl_pixelstore_attrib *unpack);
  146.  
  147.  
  148. void
  149. _mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][4],
  150.                                 GLenum dstFormat, GLenum dstType,
  151.                                 GLvoid *dstAddr);
  152.  
  153.  
  154. void
  155. _mesa_pack_rgba_span_from_ints(struct gl_context *ctx, GLuint n, GLint rgba[][4],
  156.                                GLenum dstFormat, GLenum dstType,
  157.                                GLvoid *dstAddr);
  158.  
  159.  
  160. extern void
  161. _mesa_rebase_rgba_float(GLuint n, GLfloat rgba[][4], GLenum baseFormat);
  162.  
  163. extern void
  164. _mesa_rebase_rgba_uint(GLuint n, GLuint rgba[][4], GLenum baseFormat);
  165.  
  166. #endif
  167.