1 /* $Id: light.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
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:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
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.
38 struct gl_shine_tab
*next
, *prev
;
39 GLfloat tab
[SHINE_TABLE_SIZE
+1];
45 extern void gl_ShadeModel( GLcontext
*ctx
, GLenum mode
);
47 extern void gl_ColorMaterial( GLcontext
*ctx
, GLenum face
, GLenum mode
);
49 extern void gl_Lightfv( GLcontext
*ctx
,
50 GLenum light
, GLenum pname
, const GLfloat
*params
,
53 extern void gl_LightModelfv( GLcontext
*ctx
,
54 GLenum pname
, const GLfloat
*params
);
57 extern GLuint
gl_material_bitmask( GLcontext
*ctx
,
58 GLenum face
, GLenum pname
,
62 extern void gl_set_material( GLcontext
*ctx
, GLuint bitmask
,
63 const GLfloat
*params
);
65 extern void gl_Materialfv( GLcontext
*ctx
,
66 GLenum face
, GLenum pname
, const GLfloat
*params
);
70 extern void gl_GetLightfv( GLcontext
*ctx
,
71 GLenum light
, GLenum pname
, GLfloat
*params
);
73 extern void gl_GetLightiv( GLcontext
*ctx
,
74 GLenum light
, GLenum pname
, GLint
*params
);
77 extern void gl_GetMaterialfv( GLcontext
*ctx
,
78 GLenum face
, GLenum pname
, GLfloat
*params
);
80 extern void gl_GetMaterialiv( GLcontext
*ctx
,
81 GLenum face
, GLenum pname
, GLint
*params
);
84 extern void gl_compute_spot_exp_table( struct gl_light
*l
);
86 extern void gl_compute_shine_table( GLcontext
*ctx
, GLuint i
,
89 extern void gl_update_lighting( GLcontext
*ctx
);
91 extern void gl_compute_light_positions( GLcontext
*ctx
);
93 extern void gl_update_normal_transform( GLcontext
*ctx
);
95 extern void gl_update_material( GLcontext
*ctx
,
96 struct gl_material
*m
,
99 extern void gl_update_color_material( GLcontext
*ctx
, const GLubyte rgba
[4] );