ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/shader_vars.h
Revision: 1.7
Committed: Sat Oct 30 00:17:28 2004 UTC (19 years, 7 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +62 -80 lines
Log Message:
*** empty log message ***

File Contents

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