Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4358 Serge 1
/*
2
 * Mesa 3-D graphics library
3
 *
4
 * Copyright (c) 2011 VMware, Inc.
5
 *
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:
12
 *
13
 * The above copyright notice and this permission notice shall be included
14
 * in all copies or substantial portions of the Software.
15
 *
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 OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
 * OTHER DEALINGS IN THE SOFTWARE.
23
 */
24
 
25
 
26
#ifndef FORMAT_PACK_H
27
#define FORMAT_PACK_H
28
 
29
 
30
#include "formats.h"
31
 
32
 
33
/** Pack a GLubyte rgba[4] color to dest address */
34
typedef void (*gl_pack_ubyte_rgba_func)(const GLubyte src[4], void *dst);
35
 
36
/** Pack a GLfloat rgba[4] color to dest address */
37
typedef void (*gl_pack_float_rgba_func)(const GLfloat src[4], void *dst);
38
 
39
/** Pack a GLfloat Z value to dest address */
40
typedef void (*gl_pack_float_z_func)(const GLfloat *src, void *dst);
41
 
42
/** Pack a GLuint Z value to dest address */
43
typedef void (*gl_pack_uint_z_func)(const GLuint *src, void *dst);
44
 
45
/** Pack a GLubyte stencil value to dest address */
46
typedef void (*gl_pack_ubyte_stencil_func)(const GLubyte *src, void *dst);
47
 
48
 
49
 
50
 
51
extern gl_pack_ubyte_rgba_func
52
_mesa_get_pack_ubyte_rgba_function(gl_format format);
53
 
54
 
55
extern gl_pack_float_rgba_func
56
_mesa_get_pack_float_rgba_function(gl_format format);
57
 
58
 
59
extern gl_pack_float_z_func
60
_mesa_get_pack_float_z_func(gl_format format);
61
 
62
 
63
extern gl_pack_uint_z_func
64
_mesa_get_pack_uint_z_func(gl_format format);
65
 
66
 
67
extern gl_pack_ubyte_stencil_func
68
_mesa_get_pack_ubyte_stencil_func(gl_format format);
69
 
70
 
71
 
72
extern void
73
_mesa_pack_float_rgba_row(gl_format format, GLuint n,
74
                          const GLfloat src[][4], void *dst);
75
 
76
extern void
77
_mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
78
                          const GLubyte src[][4], void *dst);
79
 
80
 
81
extern void
82
_mesa_pack_ubyte_rgba_rect(gl_format format, GLuint width, GLuint height,
83
                           const GLubyte *src, GLint srcRowStride,
84
                           void *dst, GLint dstRowStride);
85
 
86
extern void
87
_mesa_pack_float_z_row(gl_format format, GLuint n,
88
                       const GLfloat *src, void *dst);
89
 
90
extern void
91
_mesa_pack_uint_z_row(gl_format format, GLuint n,
92
                      const GLuint *src, void *dst);
93
 
94
extern void
95
_mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
96
                             const GLubyte *src, void *dst);
97
 
98
extern void
99
_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
100
                                       const GLuint *src, void *dst);
101
 
102
 
103
extern void
104
_mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst);
105
 
106
#endif