Added most of the infrastructure required to support
[mesa.git] / src / mesa / main / pixel.h
1 /**
2 * \file pixel.h
3 * Pixel operations.
4 */
5
6 /*
7 * Mesa 3-D graphics library
8 * Version: 5.1
9 *
10 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 */
29
30
31 #ifndef PIXEL_H
32 #define PIXEL_H
33
34
35 #include "mtypes.h"
36
37
38 /** \name API functions */
39 /*@*/
40
41 extern void
42 _mesa_GetPixelMapfv( GLenum map, GLfloat *values );
43
44 extern void
45 _mesa_GetPixelMapuiv( GLenum map, GLuint *values );
46
47 extern void
48 _mesa_GetPixelMapusv( GLenum map, GLushort *values );
49
50 extern void
51 _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values );
52
53 extern void
54 _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values );
55
56 extern void
57 _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values );
58
59 extern void
60 _mesa_PixelStoref( GLenum pname, GLfloat param );
61
62 extern void
63 _mesa_PixelStorei( GLenum pname, GLint param );
64
65 extern void
66 _mesa_PixelTransferf( GLenum pname, GLfloat param );
67
68 extern void
69 _mesa_PixelTransferi( GLenum pname, GLint param );
70
71 extern void
72 _mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor );
73
74 /*@}*/
75
76
77 /** \name Pixel processing functions */
78 /*@{*/
79
80 extern void
81 _mesa_scale_and_bias_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4],
82 GLfloat rScale, GLfloat gScale,
83 GLfloat bScale, GLfloat aScale,
84 GLfloat rBias, GLfloat gBias,
85 GLfloat bBias, GLfloat aBias);
86
87 extern void
88 _mesa_map_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]);
89
90
91 extern void
92 _mesa_transform_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]);
93
94
95 extern void
96 _mesa_lookup_rgba(const struct gl_color_table *table,
97 GLuint n, GLfloat rgba[][4]);
98
99
100 extern void
101 _mesa_shift_and_offset_ci(const GLcontext *ctx, GLuint n,
102 GLuint indexes[]);
103
104
105 extern void
106 _mesa_map_ci(const GLcontext *ctx, GLuint n, GLuint index[]);
107
108
109 extern void
110 _mesa_map_ci_to_rgba_chan(const GLcontext *ctx,
111 GLuint n, const GLuint index[],
112 GLchan rgba[][4]);
113
114
115 extern void
116 _mesa_map_ci_to_rgba(const GLcontext *ctx,
117 GLuint n, const GLuint index[], GLfloat rgba[][4]);
118
119
120 extern void
121 _mesa_map_ci8_to_rgba(const GLcontext *ctx,
122 GLuint n, const GLubyte index[],
123 GLchan rgba[][4]);
124
125
126 extern void
127 _mesa_shift_and_offset_stencil(const GLcontext *ctx, GLuint n,
128 GLstencil indexes[]);
129
130
131 extern void
132 _mesa_map_stencil(const GLcontext *ctx, GLuint n, GLstencil index[]);
133
134
135 extern void
136 _mesa_chan_to_float_span(const GLcontext *ctx, GLuint n,
137 CONST GLchan rgba[][4], GLfloat rgbaf[][4]);
138
139
140 extern void
141 _mesa_update_pixel( GLcontext *ctx, GLuint newstate );
142
143 extern void
144 _mesa_init_pixel( GLcontext * ctx );
145
146 /*@}*/
147
148 #endif