-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgz.h
50 lines (37 loc) · 1.02 KB
/
gz.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Gz.h
* csci 580 USC
*/
/*
* universal constants
*/
#define GZ_SUCCESS 0
#define GZ_FAILURE 1
/*
* name list tokens
*/
#define GZ_NULL_TOKEN 0 /* triangle vert attributes */
#define GZ_POSITION 1
#define GZ_NORMAL 2
#define GZ_TEXTURE_INDEX 3
/* renderer-state color values for default (flat) shading */
#define GZ_RGB_COLOR 99 /* we use RGB color space */
/*
* flags fields for value list attributes
*/
typedef int GzToken;
typedef void *GzPointer;
typedef float GzColor[3];
typedef short GzIntensity; /* 0 - 4095 in lower 12-bits */
typedef float GzCoord[3];
typedef float GzTextureIndex[2];
typedef float GzMatrix[4][4];
typedef int GzDepth; /* z is signed for clipping */
#define RED 0 /* array indicies for color vector */
#define GREEN 1
#define BLUE 2
#define X 0 /* array indicies for position vector */
#define Y 1
#define Z 2
#define U 0 /* array indicies for texture coords */
#define V 1