changed a warning string
[mesa.git] / src / mesa / main / image.h
1 /* $Id: image.h,v 1.3 1999/11/11 01:22:27 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.1
6 *
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 #ifndef IMAGE_H
29 #define IMAGE_H
30
31
32 #include "types.h"
33
34
35 extern struct gl_pixelstore_attrib _mesa_native_packing;
36
37
38 extern void gl_flip_bytes( GLubyte *p, GLuint n );
39
40
41 extern void gl_swap2( GLushort *p, GLuint n );
42
43 extern void gl_swap4( GLuint *p, GLuint n );
44
45
46 extern GLint gl_sizeof_type( GLenum type );
47
48 extern GLint gl_sizeof_packed_type( GLenum type );
49
50 extern GLint gl_components_in_format( GLenum format );
51
52 extern GLint gl_bytes_per_pixel( GLenum format, GLenum type );
53
54 extern GLboolean gl_is_legal_format_and_type( GLenum format, GLenum type );
55
56
57 extern GLvoid *
58 gl_pixel_addr_in_image( const struct gl_pixelstore_attrib *packing,
59 const GLvoid *image, GLsizei width,
60 GLsizei height, GLenum format, GLenum type,
61 GLint img, GLint row, GLint column );
62
63
64 extern void
65 gl_unpack_polygon_stipple( const GLcontext *ctx,
66 const GLubyte *pattern,
67 GLuint dest[32] );
68
69
70 extern void
71 gl_pack_polygon_stipple( const GLcontext *ctx,
72 const GLuint pattern[32],
73 GLubyte *dest );
74
75
76 extern void
77 gl_pack_rgba_span( const GLcontext *ctx,
78 GLuint n, CONST GLubyte rgba[][4],
79 GLenum format, GLenum type, GLvoid *dest,
80 const struct gl_pixelstore_attrib *packing,
81 GLboolean applyTransferOps );
82
83
84 extern void
85 _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
86 GLuint n, GLenum dstFormat, GLubyte dest[],
87 GLenum srcFormat, GLenum srcType,
88 const GLvoid *source,
89 const struct gl_pixelstore_attrib *unpacking,
90 GLboolean applyTransferOps );
91
92
93 extern void
94 _mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
95 GLenum dstType, GLvoid *dest,
96 GLenum srcType, const GLvoid *source,
97 const struct gl_pixelstore_attrib *unpacking,
98 GLboolean applyTransferOps );
99
100
101 extern void
102 _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
103 GLenum dstType, GLvoid *dest,
104 GLenum srcType, const GLvoid *source,
105 const struct gl_pixelstore_attrib *unpacking,
106 GLboolean applyTransferOps );
107
108
109 extern void
110 _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest,
111 GLenum srcType, const GLvoid *source,
112 const struct gl_pixelstore_attrib *unpacking,
113 GLboolean applyTransferOps );
114
115
116 extern void *
117 _mesa_unpack_image( GLsizei width, GLsizei height, GLsizei depth,
118 GLenum format, GLenum type, const GLvoid *pixels,
119 const struct gl_pixelstore_attrib *unpack );
120
121
122 extern GLvoid *
123 _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
124 const struct gl_pixelstore_attrib *packing );
125
126
127 #endif