ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/shader.h
(Generate patch)

Comparing libgender/shader.h (file contents):
Revision 1.7 by root, Sun Oct 24 00:36:23 2004 UTC vs.
Revision 1.8 by root, Sun Oct 24 00:56:04 2004 UTC

48 struct sl_func0 48 struct sl_func0
49 { 49 {
50 const char *name_par; 50 const char *name_par;
51 sl_func0 (const char *name_par) : name_par(name_par) { } 51 sl_func0 (const char *name_par) : name_par(name_par) { }
52 void begin () const; 52 void begin () const;
53 void comma () const;
53 void end () const; 54 void end () const;
54 void operator ()() const 55 void operator ()() const
55 { 56 {
56 begin (); 57 begin ();
57 end (); 58 end ();
69 template<class A, class B> 70 template<class A, class B>
70 struct sl_func2 : sl_func0 71 struct sl_func2 : sl_func0
71 { 72 {
72 const A a; const B b; 73 const A a; const B b;
73 sl_func2 (const char *name, const A &a, const B &b) : sl_func0(name), a(a), b(b) { } 74 sl_func2 (const char *name, const A &a, const B &b) : sl_func0(name), a(a), b(b) { }
74 void operator ()() const { begin (); a (); b (); end (); } 75 void operator ()() const { begin (); a (); comma (); b (); end (); }
75 }; 76 };
76 77
77 template<class A, class B, class C> 78 template<class A, class B, class C>
78 struct sl_func3 : sl_func0 79 struct sl_func3 : sl_func0
79 { 80 {
80 const A a; const B b; const C c; 81 const A a; const B b; const C c;
81 sl_func3 (const char *name, const A &a, const B &b, const C &c) : sl_func0(name), a(a), b(b), c(c) { } 82 sl_func3 (const char *name, const A &a, const B &b, const C &c) : sl_func0(name), a(a), b(b), c(c) { }
82 void operator ()() const { begin (); a (); b (); c (); end (); } 83 void operator ()() const { begin (); a (); comma (); b (); comma (); c (); end (); }
83 }; 84 };
84 85
85 template<class A, class B, class C, class D> 86 template<class A, class B, class C, class D>
86 struct sl_func4 : sl_func0 87 struct sl_func4 : sl_func0
87 { 88 {
88 const A a; const B b; const C c; const D d; 89 const A a; const B b; const C c; const D d;
89 sl_func4 (const char *name, const A &a, const B &b, const C &c, const D &d) : sl_func0(name), a(a), b(b), c(c), d(d) { } 90 sl_func4 (const char *name, const A &a, const B &b, const C &c, const D &d) : sl_func0(name), a(a), b(b), c(c), d(d) { }
90 void operator ()() const { begin (); a (); b (); c (); d(); end (); } 91 void operator ()() const { begin (); a (); comma (); b (); comma (); c (); comma (); d(); end (); }
91 }; 92 };
92 93
93 class refcounted 94 class refcounted
94 { 95 {
95 template<class type> friend class ref; 96 template<class type> friend class ref;
750 } 751 }
751 }; 752 };
752 753
753 extern const fragment_const_string str_2sp; 754 extern const fragment_const_string str_2sp;
754 extern const fragment_const_string str_equal; 755 extern const fragment_const_string str_equal;
756 extern const fragment_const_string str_comma;
755 extern const fragment_const_string str_endl; 757 extern const fragment_const_string str_endl;
756 758
757 template<class fragment, typename expr> 759 template<class fragment, typename expr>
758 inline void sl_assign (const fragment &f, const expr &e) 760 inline void sl_assign (const fragment &f, const expr &e)
759 { 761 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines