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

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

41 struct sl_concat4 41 struct sl_concat4
42 { 42 {
43 const A a; const B b; const C c; const D d; 43 const A a; const B b; const C c; const D d;
44 sl_concat4 (const A &a, const B &b, const C &c, const D &d) : a(a), b(b), c(c), d(d) { } 44 sl_concat4 (const A &a, const B &b, const C &c, const D &d) : a(a), b(b), c(c), d(d) { }
45 void operator ()() const { a (); b (); c (); d(); } 45 void operator ()() const { a (); b (); c (); d(); }
46 };
47
48 struct sl_func0
49 {
50 const char *name_par;
51 sl_func0 (const char *name_par) : name_par(name_par) { }
52 void begin () const;
53 void end () const;
54 void operator ()() const
55 {
56 begin ();
57 end ();
58 }
59 };
60
61 template<class A>
62 struct sl_func1 : sl_func0
63 {
64 const A a;
65 sl_func1 (const char *name, const A &a) : sl_func0(name), a(a) { }
66 void operator ()() const { begin (); a (); end (); }
67 };
68
69 template<class A, class B>
70 struct sl_func2 : sl_func0
71 {
72 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 void operator ()() const { begin (); a (); b (); end (); }
75 };
76
77 template<class A, class B, class C>
78 struct sl_func3 : sl_func0
79 {
80 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 void operator ()() const { begin (); a (); b (); c (); end (); }
83 };
84
85 template<class A, class B, class C, class D>
86 struct sl_func4 : sl_func0
87 {
88 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 void operator ()() const { begin (); a (); b (); c (); d(); end (); }
46 }; 91 };
47 92
48 class refcounted 93 class refcounted
49 { 94 {
50 template<class type> friend class ref; 95 template<class type> friend class ref;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines