ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/shader_vars.h
Revision: 1.4
Committed: Sun Oct 24 20:29:54 2004 UTC (19 years, 7 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.3: +33 -33 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #ifndef SHADER_VARS_H
2 #define SHADER_VARS_H
3
4 #include "shader.h"
5
6 namespace shader {
7
8 extern struct vin
9 {
10 // for setting
11 static varying_3f vertex_3f;
12 static varying_4f vertex_4f;
13 static varying_3f normal_3f;
14 static varying_3f color_3f;
15 static varying_4f color_4f;
16 static varying_3f secondary_color_3f;
17 static varying_4f secondary_color_4f;
18 static varying_1f tex_coord_1f[8];
19 static varying_2f tex_coord_2f[8];
20 static varying_3f tex_coord_3f[8];
21 static varying_4f tex_coord_4f[8];
22
23 // for the vertex shader
24 static const glvar vertex;
25 static const glvar normal;
26 static const glvar color;
27 static const glvar secondary_color;
28 static const glvar tex_coord[8];
29 static const glvar fog_coord;
30 } vin;
31
32 extern struct vout
33 {
34 // glstate builtin
35 static const glvar position;
36 static const glvar point_size;
37 static const glvar clip_vertex;
38
39 // standard varying
40 static const glvar front_color;
41 static const glvar back_color;
42 static const glvar front_secondary_color;
43 static const glvar back_secondary_color;
44 static const glvar tex_coord[8];
45 static const glvar fog_frag_coord;
46 } vout;
47
48 extern struct fin
49 {
50 // glstate builtin
51 static const glvar frag_coord;
52 static const glvar front_facing;
53
54 // standard varying
55 static const glvar color;
56 static const glvar secondary_color;
57 static const glvar tex_coord[8];
58 static const glvar fog_frag_coord;
59 } fin;
60
61 extern struct fout
62 {
63 // glstate builtin
64 static const glvar frag_color;
65 static const glvar frag_depth;
66 static const glvar frag_data[2];
67 } fout;
68
69 // predefined globals
70 extern struct gl {
71 static glvar model_view_matrix,
72 projection_matrix,
73 model_view_projection_matrix,
74 texture_matrix[8];
75 static glvar model_view_matrix_inverse,
76 projection_matrix_inverse,
77 model_view_projection_matrix_inverse,
78 texture_matrix_inverse[8];
79 static glvar model_view_matrix_transpose,
80 projection_matrix_transpose,
81 model_view_projection_matrix_transpose,
82 texture_matrix_transpose[8];
83 static glvar model_view_matrix_inverse_transpose,
84 projection_matrix_inverse_transpose,
85 model_view_projection_matrix_inverse_transpose,
86 texture_matrix_inverse_transpose[8];
87
88 static glvar normal_matrix;
89
90 static glvar normal_scale;
91 static glvar depth_range_near, depth_range_far, depth_range_diff;
92
93 static glvar clip_plane[2];//TODO
94
95 // point parameters TODO
96
97 static glvar front_material_emission,
98 front_material_ambient,
99 front_material_diffuse,
100 front_material_specular,
101 front_material_shininess;
102 static glvar back_material_emission,
103 back_material_ambient,
104 back_material_diffuse,
105 back_material_specular,
106 back_material_shininess;
107
108 // light source parameters TODO
109
110 static glvar light_model_ambient;
111 static glvar front_light_model_product_scene_color;
112 static glvar back_light_model_product_scene_color;
113
114 // light products TODO
115 // texture env and gen TODO
116 // fogparameters TODO
117
118 // shader output are in vout and fout
119 } gl;
120
121 }
122
123 #endif
124
125