pixel.h revision 7117f1b4
1/** 2 * \file pixel.h 3 * Pixel operations. 4 */ 5 6/* 7 * Mesa 3-D graphics library 8 * Version: 6.5.2 9 * 10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 11 * 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: 18 * 19 * The above copyright notice and this permission notice shall be included 20 * in all copies or substantial portions of the Software. 21 * 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. 28 */ 29 30 31#ifndef PIXEL_H 32#define PIXEL_H 33 34 35#include "mtypes.h" 36 37 38/** \name API functions */ 39/*@{*/ 40 41extern void GLAPIENTRY 42_mesa_GetPixelMapfv( GLenum map, GLfloat *values ); 43 44extern void GLAPIENTRY 45_mesa_GetPixelMapuiv( GLenum map, GLuint *values ); 46 47extern void GLAPIENTRY 48_mesa_GetPixelMapusv( GLenum map, GLushort *values ); 49 50extern void GLAPIENTRY 51_mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ); 52 53extern void GLAPIENTRY 54_mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ); 55 56extern void GLAPIENTRY 57_mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ); 58 59extern void GLAPIENTRY 60_mesa_PixelStoref( GLenum pname, GLfloat param ); 61 62 63extern void GLAPIENTRY 64_mesa_PixelStorei( GLenum pname, GLint param ); 65 66extern void GLAPIENTRY 67_mesa_PixelTransferf( GLenum pname, GLfloat param ); 68 69extern void GLAPIENTRY 70_mesa_PixelTransferi( GLenum pname, GLint param ); 71 72extern void GLAPIENTRY 73_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor ); 74 75/*@}*/ 76 77 78/** \name Pixel processing functions */ 79/*@{*/ 80 81extern void 82_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4], 83 GLfloat rScale, GLfloat gScale, 84 GLfloat bScale, GLfloat aScale, 85 GLfloat rBias, GLfloat gBias, 86 GLfloat bBias, GLfloat aBias); 87 88extern void 89_mesa_map_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]); 90 91 92extern void 93_mesa_transform_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]); 94 95 96extern void 97_mesa_lookup_rgba_float(const struct gl_color_table *table, 98 GLuint n, GLfloat rgba[][4]); 99 100extern void 101_mesa_lookup_rgba_ubyte(const struct gl_color_table *table, 102 GLuint n, GLubyte rgba[][4]); 103 104 105extern void 106_mesa_map_ci_to_rgba(const GLcontext *ctx, 107 GLuint n, const GLuint index[], GLfloat rgba[][4]); 108 109 110extern void 111_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[], 112 GLubyte rgba[][4]); 113 114 115extern void 116_mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n, 117 GLfloat depthValues[]); 118 119 120extern void 121_mesa_update_pixel( GLcontext *ctx, GLuint newstate ); 122 123extern void 124_mesa_init_pixel( GLcontext * ctx ); 125 126/*@}*/ 127 128#endif 129