… | |
… | |
117 | CGparameter param; |
117 | CGparameter param; |
118 | int name; |
118 | int name; |
119 | const char *typestr; |
119 | const char *typestr; |
120 | |
120 | |
121 | void build (shader_builder &b); |
121 | void build (shader_builder &b); |
122 | virtual void build_decl (ostringstream &b) = 0; |
122 | virtual void build_decl (ostringstream &b); |
123 | |
123 | |
124 | var_i (CGtype cgtype, const char *typestr); |
124 | var_i (CGtype cgtype, const char *typestr); |
125 | ~var_i (); |
125 | ~var_i (); |
126 | }; |
126 | }; |
127 | |
127 | |
… | |
… | |
355 | |
355 | |
356 | template<CGtype cgtype, const char *strtype> |
356 | template<CGtype cgtype, const char *strtype> |
357 | struct temp_ref : ref<temporary_i> |
357 | struct temp_ref : ref<temporary_i> |
358 | { |
358 | { |
359 | temp_ref () |
359 | temp_ref () |
360 | : ref<temporary_i> (new temporary_i (cgtype, strtype)) |
360 | : ref<temporary_i> (*new temporary_i (cgtype, strtype)) |
361 | { |
361 | { |
362 | } |
362 | } |
363 | }; |
363 | }; |
364 | |
364 | |
365 | typedef temp_ref<CG_FLOAT, str_float > temp_1f; |
365 | typedef temp_ref<CG_FLOAT, str_float > temp_1f; |
… | |
… | |
445 | { |
445 | { |
446 | value <<= 1; |
446 | value <<= 1; |
447 | } |
447 | } |
448 | return value; |
448 | return value; |
449 | } |
449 | } |
450 | |
|
|
451 | |
|
|
452 | |
450 | |
453 | struct material |
451 | struct material |
454 | { |
452 | { |
455 | virtual void begin () = 0; |
453 | virtual void begin () = 0; |
456 | virtual void end () = 0; |
454 | virtual void end () = 0; |