2 * Mesa 3-D graphics library
4 * Copyright (c) 2011 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 /** Pack a GLubyte rgba[4] color to dest address */
33 typedef void (*gl_pack_ubyte_rgba_func)(const GLubyte src[4], void *dst);
35 /** Pack a GLfloat rgba[4] color to dest address */
36 typedef void (*gl_pack_float_rgba_func)(const GLfloat src[4], void *dst);
38 /** Pack a GLfloat Z value to dest address */
39 typedef void (*gl_pack_float_z_func)(const GLfloat *src, void *dst);
41 /** Pack a GLuint Z value to dest address */
42 typedef void (*gl_pack_uint_z_func)(const GLuint *src, void *dst);
44 /** Pack a GLubyte stencil value to dest address */
45 typedef void (*gl_pack_ubyte_stencil_func)(const GLubyte *src, void *dst);
50 extern gl_pack_ubyte_rgba_func
51 _mesa_get_pack_ubyte_rgba_function(gl_format format);
54 extern gl_pack_float_rgba_func
55 _mesa_get_pack_float_rgba_function(gl_format format);
58 extern gl_pack_float_z_func
59 _mesa_get_pack_float_z_func(gl_format format);
62 extern gl_pack_uint_z_func
63 _mesa_get_pack_uint_z_func(gl_format format);
66 extern gl_pack_ubyte_stencil_func
67 _mesa_get_pack_ubyte_stencil_func(gl_format format);
72 _mesa_pack_float_rgba_row(gl_format format, GLuint n,
73 const GLfloat src[][4], void *dst);
76 _mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
77 const GLubyte src[][4], void *dst);
82 _mesa_pack_float_z_row(gl_format format, GLuint n,
83 const GLfloat *src, void *dst);
86 _mesa_pack_uint_z_row(gl_format format, GLuint n,
87 const GLuint *src, void *dst);
90 _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
91 const GLubyte *src, void *dst);
94 _mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
95 const GLuint *src, void *dst);
99 _mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst);