[MSHTML_WINETEST]
[reactos.git] / reactos / dll / opengl / mesa / src / mesa / main / pack.h
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 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 #ifndef PACK_H
27 #define PACK_H
28
29
30 #include "mtypes.h"
31
32
33 extern void
34 _mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32],
35 const struct gl_pixelstore_attrib *unpacking);
36
37
38 extern void
39 _mesa_pack_polygon_stipple(const GLuint pattern[32], GLubyte *dest,
40 const struct gl_pixelstore_attrib *packing);
41
42
43 extern GLvoid *
44 _mesa_unpack_bitmap(GLint width, GLint height, const GLubyte *pixels,
45 const struct gl_pixelstore_attrib *packing);
46
47 extern void
48 _mesa_pack_bitmap(GLint width, GLint height, const GLubyte *source,
49 GLubyte *dest, const struct gl_pixelstore_attrib *packing);
50
51
52 extern void
53 _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n,
54 GLfloat rgba[][4],
55 GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
56 const struct gl_pixelstore_attrib *dstPacking,
57 GLbitfield transferOps);
58
59
60 extern void
61 _mesa_unpack_color_span_ubyte(struct gl_context *ctx,
62 GLuint n, GLenum dstFormat, GLubyte dest[],
63 GLenum srcFormat, GLenum srcType,
64 const GLvoid *source,
65 const struct gl_pixelstore_attrib *srcPacking,
66 GLbitfield transferOps);
67
68
69 extern void
70 _mesa_unpack_color_span_float(struct gl_context *ctx,
71 GLuint n, GLenum dstFormat, GLfloat dest[],
72 GLenum srcFormat, GLenum srcType,
73 const GLvoid *source,
74 const struct gl_pixelstore_attrib *srcPacking,
75 GLbitfield transferOps);
76
77 extern void
78 _mesa_unpack_color_span_uint(struct gl_context *ctx,
79 GLuint n, GLenum dstFormat, GLuint *dest,
80 GLenum srcFormat, GLenum srcType,
81 const GLvoid *source,
82 const struct gl_pixelstore_attrib *srcPacking);
83
84 extern void
85 _mesa_unpack_index_span(struct gl_context *ctx, GLuint n,
86 GLenum dstType, GLvoid *dest,
87 GLenum srcType, const GLvoid *source,
88 const struct gl_pixelstore_attrib *srcPacking,
89 GLbitfield transferOps);
90
91
92 extern void
93 _mesa_pack_index_span(struct gl_context *ctx, GLuint n,
94 GLenum dstType, GLvoid *dest, const GLuint *source,
95 const struct gl_pixelstore_attrib *dstPacking,
96 GLbitfield transferOps);
97
98
99 extern void
100 _mesa_unpack_stencil_span(struct gl_context *ctx, GLuint n,
101 GLenum dstType, GLvoid *dest,
102 GLenum srcType, const GLvoid *source,
103 const struct gl_pixelstore_attrib *srcPacking,
104 GLbitfield transferOps);
105
106 extern void
107 _mesa_pack_stencil_span(struct gl_context *ctx, GLuint n,
108 GLenum dstType, GLvoid *dest, const GLubyte *source,
109 const struct gl_pixelstore_attrib *dstPacking);
110
111
112 extern void
113 _mesa_unpack_depth_span(struct gl_context *ctx, GLuint n,
114 GLenum dstType, GLvoid *dest, GLuint depthMax,
115 GLenum srcType, const GLvoid *source,
116 const struct gl_pixelstore_attrib *srcPacking);
117
118 extern void
119 _mesa_pack_depth_span(struct gl_context *ctx, GLuint n, GLvoid *dest,
120 GLenum dstType, const GLfloat *depthSpan,
121 const struct gl_pixelstore_attrib *dstPacking);
122
123
124 extern void *
125 _mesa_unpack_image(GLuint dimensions,
126 GLsizei width, GLsizei height, GLsizei depth,
127 GLenum format, GLenum type, const GLvoid *pixels,
128 const struct gl_pixelstore_attrib *unpack);
129
130
131 void
132 _mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4],
133 GLenum dstFormat, GLenum dstType,
134 GLvoid *dstAddr);
135
136
137 extern void
138 _mesa_rebase_rgba_float(GLuint n, GLfloat rgba[][4], GLenum baseFormat);
139
140 extern void
141 _mesa_rebase_rgba_uint(GLuint n, GLuint rgba[][4], GLenum baseFormat);
142
143 #endif