fix for eval regression
[mesa.git] / src / mesa / main / light.h
1 /* $Id: light.h,v 1.3 2000/06/26 23:37:46 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999-2000 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 LIGHT_H
29 #define LIGHT_H
30
31
32 #include "types.h"
33
34 struct gl_shine_tab {
35 struct gl_shine_tab *next, *prev;
36 GLfloat tab[SHINE_TABLE_SIZE+1];
37 GLfloat shininess;
38 GLuint refcount;
39 };
40
41
42 extern void
43 _mesa_ShadeModel( GLenum mode );
44
45 extern void
46 _mesa_ColorMaterial( GLenum face, GLenum mode );
47
48 extern void
49 _mesa_Lightf( GLenum light, GLenum pname, GLfloat param );
50
51 extern void
52 _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params );
53
54 extern void
55 _mesa_Lightiv( GLenum light, GLenum pname, const GLint *params );
56
57 extern void
58 _mesa_Lighti( GLenum light, GLenum pname, GLint param );
59
60 extern void
61 _mesa_LightModelf( GLenum pname, GLfloat param );
62
63 extern void
64 _mesa_LightModelfv( GLenum pname, const GLfloat *params );
65
66 extern void
67 _mesa_LightModeli( GLenum pname, GLint param );
68
69 extern void
70 _mesa_LightModeliv( GLenum pname, const GLint *params );
71
72 extern void
73 _mesa_Materialf( GLenum face, GLenum pname, GLfloat param );
74
75 extern void
76 _mesa_Materialfv( GLenum face, GLenum pname, const GLfloat *params );
77
78 extern void
79 _mesa_Materiali( GLenum face, GLenum pname, GLint param );
80
81 extern void
82 _mesa_Materialiv( GLenum face, GLenum pname, const GLint *params );
83
84 extern void
85 _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params );
86
87 extern void
88 _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params );
89
90 extern void
91 _mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
92
93 extern void
94 _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params );
95
96
97
98 extern GLuint gl_material_bitmask( GLcontext *ctx,
99 GLenum face, GLenum pname,
100 GLuint legal,
101 const char * );
102
103 extern void gl_set_material( GLcontext *ctx, GLuint bitmask,
104 const GLfloat *params);
105
106 extern void gl_compute_spot_exp_table( struct gl_light *l );
107
108 extern void gl_compute_shine_table( GLcontext *ctx, GLuint i,
109 GLfloat shininess );
110
111 extern void gl_update_lighting( GLcontext *ctx );
112
113 extern void gl_compute_light_positions( GLcontext *ctx );
114
115 extern void gl_update_normal_transform( GLcontext *ctx );
116
117 extern void gl_update_material( GLcontext *ctx,
118 const struct gl_material src[2],
119 GLuint bitmask );
120
121 extern void gl_update_color_material( GLcontext *ctx, const GLubyte rgba[4] );
122
123
124 #endif
125