ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/radogl.h
Revision: 3.1
Committed: Tue Jun 9 11:18:36 1998 UTC (25 years, 10 months ago) by gwlarson
Content type: text/plain
Branch: MAIN
Log Message:
Initial revision

File Contents

# User Rev Content
1 gwlarson 3.1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2    
3     /* SCCSid "$SunId$ SGI" */
4    
5     /*
6     * Header file for Radiance - OpenGL routines.
7     */
8    
9     #include "standard.h"
10     #include "color.h"
11     #include "object.h"
12     #include "otypes.h"
13     #include "lookup.h"
14     #include <GL/glu.h>
15    
16     #define MAXLIGHTS 8 /* number of OGL light sources */
17    
18     #define MAXSPECEXP 128. /* maximum allowed specular exponent */
19     #define UNKSPECEXP 25. /* value to use when exponent unknown */
20    
21     typedef struct {
22     short type; /* material type (from otypes.h) */
23     short nlinks; /* number of links to this material */
24     union {
25     struct {
26     COLOR ambdiff; /* ambient and diffuse color */
27     COLOR specular; /* specular color */
28     GLfloat specexp; /* specular exponent */
29     } m; /* regular material */
30     struct {
31     COLOR emission; /* emitting component */
32     GLfloat spotdir[3]; /* spot direction */
33     GLfloat spotang; /* spot cutoff angle */
34     } l; /* light source */
35     } u; /* union of types */
36     } MATREC; /* OGL material properties */
37    
38     extern double expval; /* global exposure value */
39     extern COLOR ambval; /* global ambient value */
40     extern int dolights; /* are we outputting light sources? */
41     extern int domats; /* are we doing materials? */
42    
43     extern LUTAB mtab; /* material/modifier lookup table */
44    
45     extern MATREC *newmaterial(), *getmatp();
46    
47     extern int newglist();
48    
49     extern double checkoct();
50    
51     #define issrcmat(m) ((m) != NULL && islight((m)->type) && \
52     (m)->type != MAT_GLOW)