light.h revision af69d88d
1/* 2 * Mesa 3-D graphics library 3 * 4 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. 5 * Copyright (C) 2009 VMware, Inc. All Rights Reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), 9 * to deal in the Software without restriction, including without limitation 10 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * and/or sell copies of the Software, and to permit persons to whom the 12 * Software is furnished to do so, subject to the following conditions: 13 * 14 * The above copyright notice and this permission notice shall be included 15 * in all copies or substantial portions of the Software. 16 * 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 * OTHER DEALINGS IN THE SOFTWARE. 24 */ 25 26 27#ifndef LIGHT_H 28#define LIGHT_H 29 30 31#include "glheader.h" 32 33struct gl_context; 34struct gl_light; 35struct gl_material; 36 37extern void GLAPIENTRY 38_mesa_ShadeModel( GLenum mode ); 39 40extern void GLAPIENTRY 41_mesa_ProvokingVertex(GLenum mode); 42 43 44extern void GLAPIENTRY 45_mesa_ColorMaterial( GLenum face, GLenum mode ); 46 47extern void GLAPIENTRY 48_mesa_Lightf( GLenum light, GLenum pname, GLfloat param ); 49 50extern void GLAPIENTRY 51_mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ); 52 53extern void GLAPIENTRY 54_mesa_Lightiv( GLenum light, GLenum pname, const GLint *params ); 55 56extern void GLAPIENTRY 57_mesa_Lighti( GLenum light, GLenum pname, GLint param ); 58 59extern void GLAPIENTRY 60_mesa_LightModelf( GLenum pname, GLfloat param ); 61 62extern void GLAPIENTRY 63_mesa_LightModelfv( GLenum pname, const GLfloat *params ); 64 65extern void GLAPIENTRY 66_mesa_LightModeli( GLenum pname, GLint param ); 67 68extern void GLAPIENTRY 69_mesa_LightModeliv( GLenum pname, const GLint *params ); 70 71extern void GLAPIENTRY 72_mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ); 73 74extern void GLAPIENTRY 75_mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ); 76 77extern void GLAPIENTRY 78_mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); 79 80extern void GLAPIENTRY 81_mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ); 82 83 84extern void 85_mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *params); 86 87 88extern GLuint _mesa_material_bitmask( struct gl_context *ctx, 89 GLenum face, GLenum pname, 90 GLuint legal, 91 const char * ); 92 93extern void _mesa_update_lighting( struct gl_context *ctx ); 94 95extern void _mesa_update_tnl_spaces( struct gl_context *ctx, GLuint new_state ); 96 97extern void _mesa_update_material( struct gl_context *ctx, 98 GLuint bitmask ); 99 100extern void _mesa_update_color_material( struct gl_context *ctx, 101 const GLfloat rgba[4] ); 102 103extern void _mesa_init_lighting( struct gl_context *ctx ); 104 105extern void _mesa_free_lighting_data( struct gl_context *ctx ); 106 107extern void _mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag ); 108 109#endif 110