… | |
… | |
23 | point () { }; |
23 | point () { }; |
24 | point (GLfloat x, GLfloat y, GLfloat z) : x(x), y(y), z(z) { }; |
24 | point (GLfloat x, GLfloat y, GLfloat z) : x(x), y(y), z(z) { }; |
25 | }; |
25 | }; |
26 | |
26 | |
27 | struct colour { |
27 | struct colour { |
28 | GLfloat r, g, b; |
28 | GLfloat r, g, b, a; |
29 | colour (GLfloat r = 1., GLfloat g = 1., GLfloat b = 1.) : r(r), g(g), b(b) { }; |
29 | colour (GLfloat r = 1., GLfloat g = 1., GLfloat b = 1., GLfloat a = 1.) : r(r), g(g), b(b), a(a) { }; |
30 | }; |
30 | }; |
31 | |
31 | |
32 | struct vec3 { |
32 | struct vec3 { |
33 | GLfloat x, y, z; |
33 | GLfloat x, y, z; |
34 | vec3 () { }; |
34 | vec3 () { }; |
… | |
… | |
66 | colour c; |
66 | colour c; |
67 | GLfloat intensity; |
67 | GLfloat intensity; |
68 | GLfloat radius; |
68 | GLfloat radius; |
69 | }; |
69 | }; |
70 | |
70 | |
|
|
71 | struct material { |
|
|
72 | colour diffuse, specular, emission; |
|
|
73 | GLfloat shininess; |
|
|
74 | }; |
|
|
75 | |
71 | struct draw_context { |
76 | struct draw_context { |
72 | enum { DEPTH, LIGHTED } mode; |
77 | enum { DEPTH, LIGHTED } mode; |
73 | light *l; |
78 | light *l; |
74 | }; |
79 | }; |
75 | |
80 | |