[3597] | 1 | /* $Id: image.h,v 1.2 2000-05-23 20:34:51 jeroen Exp $ */
|
---|
[2938] | 2 |
|
---|
| 3 | /*
|
---|
| 4 | * Mesa 3-D graphics library
|
---|
[3597] | 5 | * Version: 3.3
|
---|
[2938] | 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 |
|
---|
[3597] | 35 | extern const struct gl_pixelstore_attrib _mesa_native_packing;
|
---|
[2938] | 36 |
|
---|
| 37 |
|
---|
[3597] | 38 | extern void
|
---|
| 39 | _mesa_swap2( GLushort *p, GLuint n );
|
---|
[2938] | 40 |
|
---|
[3597] | 41 | extern void
|
---|
| 42 | _mesa_swap4( GLuint *p, GLuint n );
|
---|
[2938] | 43 |
|
---|
[3597] | 44 | extern GLint
|
---|
| 45 | _mesa_sizeof_type( GLenum type );
|
---|
[2938] | 46 |
|
---|
[3597] | 47 | extern GLint
|
---|
| 48 | _mesa_sizeof_packed_type( GLenum type );
|
---|
[2938] | 49 |
|
---|
[3597] | 50 | extern GLint
|
---|
| 51 | _mesa_components_in_format( GLenum format );
|
---|
[2938] | 52 |
|
---|
[3597] | 53 | extern GLint
|
---|
| 54 | _mesa_bytes_per_pixel( GLenum format, GLenum type );
|
---|
[2938] | 55 |
|
---|
[3597] | 56 | extern GLboolean
|
---|
| 57 | _mesa_is_legal_format_and_type( GLenum format, GLenum type );
|
---|
[2938] | 58 |
|
---|
| 59 |
|
---|
| 60 | extern GLvoid *
|
---|
[3597] | 61 | _mesa_image_address( const struct gl_pixelstore_attrib *packing,
|
---|
| 62 | const GLvoid *image, GLsizei width,
|
---|
| 63 | GLsizei height, GLenum format, GLenum type,
|
---|
| 64 | GLint img, GLint row, GLint column );
|
---|
[2938] | 65 |
|
---|
| 66 |
|
---|
[3597] | 67 | extern GLint
|
---|
| 68 | _mesa_image_row_stride( const struct gl_pixelstore_attrib *packing,
|
---|
| 69 | GLint width, GLenum format, GLenum type );
|
---|
[2938] | 70 |
|
---|
| 71 |
|
---|
[3597] | 72 | extern void
|
---|
| 73 | _mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
|
---|
| 74 | const struct gl_pixelstore_attrib *unpacking );
|
---|
[2938] | 75 |
|
---|
| 76 |
|
---|
[3597] | 77 | extern void
|
---|
| 78 | _mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
|
---|
| 79 | const struct gl_pixelstore_attrib *packing );
|
---|
[2938] | 80 |
|
---|
| 81 |
|
---|
| 82 | extern void
|
---|
[3597] | 83 | _mesa_pack_rgba_span( const GLcontext *ctx,
|
---|
| 84 | GLuint n, CONST GLubyte rgba[][4],
|
---|
| 85 | GLenum format, GLenum type, GLvoid *dest,
|
---|
| 86 | const struct gl_pixelstore_attrib *packing,
|
---|
| 87 | GLboolean applyTransferOps );
|
---|
[2938] | 88 |
|
---|
| 89 |
|
---|
| 90 | extern void
|
---|
| 91 | _mesa_unpack_ubyte_color_span( const GLcontext *ctx,
|
---|
| 92 | GLuint n, GLenum dstFormat, GLubyte dest[],
|
---|
| 93 | GLenum srcFormat, GLenum srcType,
|
---|
| 94 | const GLvoid *source,
|
---|
| 95 | const struct gl_pixelstore_attrib *unpacking,
|
---|
| 96 | GLboolean applyTransferOps );
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | extern void
|
---|
| 100 | _mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
|
---|
| 101 | GLenum dstType, GLvoid *dest,
|
---|
| 102 | GLenum srcType, const GLvoid *source,
|
---|
| 103 | const struct gl_pixelstore_attrib *unpacking,
|
---|
| 104 | GLboolean applyTransferOps );
|
---|
| 105 |
|
---|
[3597] | 106 |
|
---|
| 107 | extern void
|
---|
| 108 | _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
|
---|
| 109 | GLenum dstType, GLvoid *dest,
|
---|
| 110 | GLenum srcType, const GLvoid *source,
|
---|
| 111 | const struct gl_pixelstore_attrib *unpacking,
|
---|
| 112 | GLboolean applyTransferOps );
|
---|
| 113 |
|
---|
| 114 |
|
---|
| 115 | extern void
|
---|
| 116 | _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest,
|
---|
| 117 | GLenum srcType, const GLvoid *source,
|
---|
| 118 | const struct gl_pixelstore_attrib *unpacking,
|
---|
| 119 | GLboolean applyTransferOps );
|
---|
| 120 |
|
---|
| 121 |
|
---|
[2938] | 122 | extern void *
|
---|
| 123 | _mesa_unpack_image( GLsizei width, GLsizei height, GLsizei depth,
|
---|
| 124 | GLenum format, GLenum type, const GLvoid *pixels,
|
---|
| 125 | const struct gl_pixelstore_attrib *unpack );
|
---|
| 126 |
|
---|
| 127 |
|
---|
[3597] | 128 | extern GLvoid *
|
---|
| 129 | _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
|
---|
| 130 | const struct gl_pixelstore_attrib *packing );
|
---|
| 131 |
|
---|
| 132 | extern void
|
---|
| 133 | _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
|
---|
| 134 | GLubyte *dest, const struct gl_pixelstore_attrib *packing );
|
---|
| 135 |
|
---|
| 136 |
|
---|
[2938] | 137 | #endif
|
---|