• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
33 struct gl_context;
34 struct gl_light;
35 struct gl_material;
36 
37 extern void GLAPIENTRY
38 _mesa_ShadeModel( GLenum mode );
39 
40 extern void GLAPIENTRY
41 _mesa_ProvokingVertex(GLenum mode);
42 
43 
44 extern void GLAPIENTRY
45 _mesa_ColorMaterial( GLenum face, GLenum mode );
46 
47 extern void GLAPIENTRY
48 _mesa_Lightf( GLenum light, GLenum pname, GLfloat param );
49 
50 extern void GLAPIENTRY
51 _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params );
52 
53 extern void GLAPIENTRY
54 _mesa_Lightiv( GLenum light, GLenum pname, const GLint *params );
55 
56 extern void GLAPIENTRY
57 _mesa_Lighti( GLenum light, GLenum pname, GLint param );
58 
59 extern void GLAPIENTRY
60 _mesa_LightModelf( GLenum pname, GLfloat param );
61 
62 extern void GLAPIENTRY
63 _mesa_LightModelfv( GLenum pname, const GLfloat *params );
64 
65 extern void GLAPIENTRY
66 _mesa_LightModeli( GLenum pname, GLint param );
67 
68 extern void GLAPIENTRY
69 _mesa_LightModeliv( GLenum pname, const GLint *params );
70 
71 extern void GLAPIENTRY
72 _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params );
73 
74 extern void GLAPIENTRY
75 _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params );
76 
77 extern void GLAPIENTRY
78 _mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
79 
80 extern void GLAPIENTRY
81 _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params );
82 
83 
84 extern void
85 _mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *params);
86 
87 
88 extern GLuint _mesa_material_bitmask( struct gl_context *ctx,
89                                       GLenum face, GLenum pname,
90                                       GLuint legal,
91                                       const char * );
92 
93 extern void _mesa_update_lighting( struct gl_context *ctx );
94 
95 extern void _mesa_update_tnl_spaces( struct gl_context *ctx, GLuint new_state );
96 
97 extern void _mesa_update_material( struct gl_context *ctx,
98                                    GLuint bitmask );
99 
100 extern void _mesa_update_color_material( struct gl_context *ctx,
101                                          const GLfloat rgba[4] );
102 
103 extern void _mesa_init_lighting( struct gl_context *ctx );
104 
105 extern void _mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag );
106 
107 #endif
108