… | |
… | |
85 | void disable (view &ctx); |
85 | void disable (view &ctx); |
86 | |
86 | |
87 | test_material (); |
87 | test_material (); |
88 | }; |
88 | }; |
89 | |
89 | |
90 | struct test_material2 : material |
90 | struct mat_gouraud_shaded : material |
91 | { |
91 | { |
92 | // texture tex, norm; |
92 | // texture tex, norm; |
93 | // shader::sampler_2d texvar, normvar; |
93 | // shader::sampler_2d texvar, normvar; |
|
|
94 | colour c; |
94 | |
95 | |
95 | void vsh (view &ctx); |
96 | void vsh (view &ctx); |
96 | void fsh (view &ctx); |
97 | void fsh (view &ctx); |
97 | |
98 | |
98 | // void enable (view &ctx); |
99 | void enable (view &ctx); |
99 | // void disable (view &ctx); |
100 | void disable (view &ctx); |
|
|
101 | |
|
|
102 | mat_gouraud_shaded (const colour &c) : c(c) { } |
|
|
103 | |
|
|
104 | protected: |
|
|
105 | shader::uniform_3f sh_colour; |
|
|
106 | shader::varying_3f f_normal; |
100 | }; |
107 | }; |
101 | |
108 | |
102 | |
|
|
103 | extern test_material *testmat; |
109 | extern test_material *testmat; |
104 | extern test_material2 *testmat2; |
110 | extern mat_gouraud_shaded *testmat2; |
105 | |
111 | |
106 | #endif |
112 | #endif |
107 | |
113 | |
108 | |
114 | |