7 * Mesa 3-D graphics library
10 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
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:
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
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.
39 _mesa_swap2( GLushort
*p
, GLuint n
);
42 _mesa_swap4( GLuint
*p
, GLuint n
);
45 _mesa_sizeof_type( GLenum type
);
48 _mesa_sizeof_packed_type( GLenum type
);
51 _mesa_components_in_format( GLenum format
);
54 _mesa_bytes_per_pixel( GLenum format
, GLenum type
);
57 _mesa_is_legal_format_and_type( GLcontext
*ctx
, GLenum format
, GLenum type
);
61 _mesa_image_address( GLuint dimensions
,
62 const struct gl_pixelstore_attrib
*packing
,
64 GLsizei width
, GLsizei height
,
65 GLenum format
, GLenum type
,
66 GLint img
, GLint row
, GLint column
);
69 _mesa_image_address1d( const struct gl_pixelstore_attrib
*packing
,
72 GLenum format
, GLenum type
,
76 _mesa_image_address2d( const struct gl_pixelstore_attrib
*packing
,
78 GLsizei width
, GLsizei height
,
79 GLenum format
, GLenum type
,
80 GLint row
, GLint column
);
83 _mesa_image_address3d( const struct gl_pixelstore_attrib
*packing
,
85 GLsizei width
, GLsizei height
,
86 GLenum format
, GLenum type
,
87 GLint img
, GLint row
, GLint column
);
91 _mesa_image_row_stride( const struct gl_pixelstore_attrib
*packing
,
92 GLint width
, GLenum format
, GLenum type
);
96 _mesa_image_image_stride( const struct gl_pixelstore_attrib
*packing
,
97 GLint width
, GLint height
,
98 GLenum format
, GLenum type
);
101 _mesa_unpack_polygon_stipple( const GLubyte
*pattern
, GLuint dest
[32],
102 const struct gl_pixelstore_attrib
*unpacking
);
106 _mesa_pack_polygon_stipple( const GLuint pattern
[32], GLubyte
*dest
,
107 const struct gl_pixelstore_attrib
*packing
);
111 _mesa_unpack_bitmap( GLint width
, GLint height
, const GLubyte
*pixels
,
112 const struct gl_pixelstore_attrib
*packing
);
115 _mesa_pack_bitmap( GLint width
, GLint height
, const GLubyte
*source
,
116 GLubyte
*dest
, const struct gl_pixelstore_attrib
*packing
);
120 _mesa_apply_rgba_transfer_ops(GLcontext
*ctx
, GLuint transferOps
,
121 GLuint n
, GLfloat rgba
[][4]);
124 _mesa_pack_rgba_span_float( GLcontext
*ctx
,
125 GLuint n
, CONST GLfloat rgba
[][4],
126 GLenum dstFormat
, GLenum dstType
, GLvoid
*dstAddr
,
127 const struct gl_pixelstore_attrib
*dstPacking
,
128 GLuint transferOps
);
132 _mesa_pack_rgba_span_chan( GLcontext
*ctx
,
133 GLuint n
, CONST GLchan rgba
[][4],
134 GLenum dstFormat
, GLenum dstType
, GLvoid
*dstAddr
,
135 const struct gl_pixelstore_attrib
*dstPacking
,
136 GLuint transferOps
);
140 _mesa_unpack_color_span_chan( GLcontext
*ctx
,
141 GLuint n
, GLenum dstFormat
, GLchan dest
[],
142 GLenum srcFormat
, GLenum srcType
,
143 const GLvoid
*source
,
144 const struct gl_pixelstore_attrib
*srcPacking
,
145 GLuint transferOps
);
149 _mesa_unpack_color_span_float( GLcontext
*ctx
,
150 GLuint n
, GLenum dstFormat
, GLfloat dest
[],
151 GLenum srcFormat
, GLenum srcType
,
152 const GLvoid
*source
,
153 const struct gl_pixelstore_attrib
*srcPacking
,
154 GLuint transferOps
);
158 _mesa_unpack_index_span( const GLcontext
*ctx
, GLuint n
,
159 GLenum dstType
, GLvoid
*dest
,
160 GLenum srcType
, const GLvoid
*source
,
161 const struct gl_pixelstore_attrib
*srcPacking
,
162 GLuint transferOps
);
166 _mesa_pack_index_span( const GLcontext
*ctx
, GLuint n
,
167 GLenum dstType
, GLvoid
*dest
, const GLuint
*source
,
168 const struct gl_pixelstore_attrib
*dstPacking
,
169 GLuint transferOps
);
173 _mesa_unpack_stencil_span( const GLcontext
*ctx
, GLuint n
,
174 GLenum dstType
, GLvoid
*dest
,
175 GLenum srcType
, const GLvoid
*source
,
176 const struct gl_pixelstore_attrib
*srcPacking
,
177 GLuint transferOps
);
180 _mesa_pack_stencil_span( const GLcontext
*ctx
, GLuint n
,
181 GLenum dstType
, GLvoid
*dest
, const GLstencil
*source
,
182 const struct gl_pixelstore_attrib
*dstPacking
);
186 _mesa_unpack_depth_span( const GLcontext
*ctx
, GLuint n
, GLfloat
*dest
,
187 GLenum srcType
, const GLvoid
*source
,
188 const struct gl_pixelstore_attrib
*srcPacking
);
191 _mesa_pack_depth_span( const GLcontext
*ctx
, GLuint n
, GLvoid
*dest
,
192 GLenum dstType
, const GLfloat
*depthSpan
,
193 const struct gl_pixelstore_attrib
*dstPacking
);
197 _mesa_unpack_image( GLuint dimensions
,
198 GLsizei width
, GLsizei height
, GLsizei depth
,
199 GLenum format
, GLenum type
, const GLvoid
*pixels
,
200 const struct gl_pixelstore_attrib
*unpack
);
204 _mesa_clip_drawpixels(const GLcontext
*ctx
,
205 GLint
*destX
, GLint
*destY
,
206 GLsizei
*width
, GLsizei
*height
,
207 GLint
*skipPixels
, GLint
*skipRows
);
211 _mesa_clip_readpixels(const GLcontext
*ctx
,
212 GLint
*destX
, GLint
*destY
,
213 GLsizei
*width
, GLsizei
*height
,
214 GLint
*skipPixels
, GLint
*skipRows
);