source: trunk/src/opengl/mesa/light.h@ 3721

Last change on this file since 3721 was 3597, checked in by jeroen, 25 years ago

* empty log message *

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