xref: /reactos/dll/opengl/mesa/image.h (revision f04935d8)
1 /* $Id: image.h,v 1.5 1997/09/27 00:15:39 brianp Exp $ */
2 
3 /*
4  * Mesa 3-D graphics library
5  * Version:  2.5
6  * Copyright (C) 1995-1997  Brian Paul
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */
22 
23 
24 /*
25  * $Log: image.h,v $
26  * Revision 1.5  1997/09/27 00:15:39  brianp
27  * changed parameters to gl_unpack_image()
28  *
29  * Revision 1.4  1997/02/09 20:05:03  brianp
30  * new arguments for gl_pixel_addr_in_image()
31  *
32  * Revision 1.3  1997/02/09 18:52:53  brianp
33  * added GL_EXT_texture3D support
34  *
35  * Revision 1.2  1996/11/06 04:22:23  brianp
36  * changed gl_unpack_image() components argument to srcFormat
37  *
38  * Revision 1.1  1996/09/13 01:38:16  brianp
39  * Initial revision
40  *
41  */
42 
43 
44 #ifndef IMAGE_H
45 #define IMAGE_H
46 
47 
48 #include "types.h"
49 
50 
51 extern void gl_flip_bytes( GLubyte *p, GLuint n );
52 
53 
54 extern void gl_swap2( GLushort *p, GLuint n );
55 
56 extern void gl_swap4( GLuint *p, GLuint n );
57 
58 
59 extern GLint gl_sizeof_type( GLenum type );
60 
61 
62 extern GLint gl_components_in_format( GLenum format );
63 
64 
65 extern GLvoid *gl_pixel_addr_in_image( struct gl_pixelstore_attrib *packing,
66                                 const GLvoid *image, GLsizei width,
67                                 GLsizei height, GLenum format, GLenum type,
68                                 GLint row);
69 
70 
71 extern struct gl_image *gl_unpack_image( GLcontext *ctx,
72                                   GLint width, GLint height,
73                                   GLenum srcFormat, GLenum srcType,
74                                   const GLvoid *pixels );
75 
76 
77 extern void gl_free_image( struct gl_image *image );
78 
79 
80 #endif
81