1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ SGI" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* Header file for Radiance - OpenGL routines. |
4 |
|
*/ |
5 |
+ |
#ifndef _RAD_RADOGL_H_ |
6 |
+ |
#define _RAD_RADOGL_H_ |
7 |
|
|
8 |
|
#include "standard.h" |
9 |
< |
#include <GL/glu.h> |
9 |
> |
#ifdef __APPLE__ |
10 |
> |
#include <OpenGL/glu.h> |
11 |
> |
#else |
12 |
> |
#if defined(_WIN32) || defined(_WIN64) |
13 |
> |
#include <windows.h> |
14 |
> |
#endif |
15 |
> |
#include <GL/glu.h> |
16 |
> |
#endif |
17 |
|
#include "color.h" |
18 |
|
#include "object.h" |
19 |
|
#include "otypes.h" |
20 |
|
#include "lookup.h" |
21 |
|
|
22 |
+ |
#ifdef __cplusplus |
23 |
+ |
extern "C" { |
24 |
+ |
#endif |
25 |
+ |
|
26 |
|
#define MAXLIGHTS 8 /* number of OGL light sources */ |
27 |
|
|
28 |
|
#define MAXSPECEXP 128. /* maximum allowed specular exponent */ |
53 |
|
|
54 |
|
extern LUTAB mtab; /* material/modifier lookup table */ |
55 |
|
|
56 |
< |
extern MATREC *newmaterial(), *getmatp(); |
56 |
> |
#define issrcmat(m) ((m) != NULL && islight((m)->type) && \ |
57 |
> |
(m)->type != MAT_GLOW) |
58 |
|
|
59 |
< |
extern int newglist(); |
59 |
> |
/* defined in rgldomat.c */ |
60 |
> |
extern void domatobj(MATREC *mp, FVECT cent); |
61 |
> |
extern void domatvert(MATREC *mp, FVECT v, FVECT n); |
62 |
> |
/* defined in rglfile.c */ |
63 |
> |
extern int newglist(void); |
64 |
> |
extern void rgl_checkerr(char *where); |
65 |
> |
extern int rgl_filelist(int ic, char **inp, int *nl); |
66 |
> |
extern int rgl_octlist(char *fname, FVECT cent, RREAL *radp, int *nl); |
67 |
> |
extern void rgl_load(char *inpspec); |
68 |
> |
extern void rgl_object(char *name, FILE *fp); |
69 |
> |
/* defined in rglinst.c */ |
70 |
> |
extern int o_instance(OBJREC *o); |
71 |
> |
extern int loadoctrees(void); |
72 |
> |
extern double checkoct(char *fname, FVECT cent); |
73 |
> |
extern int loadoct(char *fname); |
74 |
> |
/* defined in rglmat.c */ |
75 |
> |
extern void rgl_matclear(void); |
76 |
> |
extern MATREC *getmatp(char *nam); |
77 |
> |
extern int o_default(OBJREC *o); |
78 |
> |
extern int o_unsupported(OBJREC *o); |
79 |
> |
extern MATREC *newmaterial(char *nam); |
80 |
> |
extern void freemtl(void *p); |
81 |
> |
extern int m_normal(OBJREC *o); |
82 |
> |
extern int m_aniso(OBJREC *o); |
83 |
> |
extern int m_glass(OBJREC *o); |
84 |
> |
extern int m_brdf(OBJREC *o); |
85 |
> |
extern int m_brdf2(OBJREC *o); |
86 |
> |
extern int m_light(OBJREC *o); |
87 |
> |
extern int m_mirror(OBJREC *o); |
88 |
> |
extern int m_prism(OBJREC *o); |
89 |
> |
/* defined in rglsrc.c */ |
90 |
> |
extern void lightinit(void); |
91 |
> |
extern void lightclean(void); |
92 |
> |
extern void lightdefs(void); |
93 |
> |
extern int o_source(OBJREC *o); |
94 |
> |
extern int doflatsrc(MATREC *m, FVECT pos, FVECT norm, double area); |
95 |
> |
extern int dosphsrc(MATREC *m, FVECT pos, double area); |
96 |
> |
/* defined in rglsurf.c */ |
97 |
> |
extern void setmaterial(MATREC *mp, FVECT cent, int ispoly); |
98 |
> |
extern double polyarea(FVECT cent, FVECT norm, int n, FVECT v[]); |
99 |
> |
extern int o_face(OBJREC *o); |
100 |
> |
extern void surfclean(void); |
101 |
> |
extern int o_sphere(OBJREC *o); |
102 |
> |
extern int o_cone(OBJREC *o); |
103 |
> |
extern int o_ring(OBJREC *o); |
104 |
|
|
50 |
– |
extern double checkoct(); |
105 |
|
|
106 |
< |
#define issrcmat(m) ((m) != NULL && islight((m)->type) && \ |
107 |
< |
(m)->type != MAT_GLOW) |
106 |
> |
#ifdef __cplusplus |
107 |
> |
} |
108 |
> |
#endif |
109 |
> |
#endif /* _RAD_RADOGL_H_ */ |
110 |
> |
|