34 |
|
|
35 |
|
|
36 |
#ifndef VOB_DEFINED |
#ifndef VOB_DEFINED |
|
#define VOB_VOBS_DEFINING_VOB_DEFINED |
|
37 |
#define VOB_DEFINED(t) |
#define VOB_DEFINED(t) |
38 |
#endif |
#endif |
39 |
|
|
74 |
|
|
75 |
VOB_DEFINED(CallList); |
VOB_DEFINED(CallList); |
76 |
|
|
77 |
#if 0 |
struct CallListCoorded : public CallList { |
78 |
struct StupidLinestrip { |
enum { NTrans = 1 }; |
79 |
vector<float> arr; |
template<class T> void render(const T &t) const { |
80 |
|
glPushMatrix(); |
81 |
void setParams(const vector<float> &arr) { |
if(t.performGL()) { |
82 |
this->arr = arr; |
glCallList(no.get()); |
83 |
|
} else { |
84 |
|
std::cout << "Error: CallistCoorded with non-glperformable.\n"; |
85 |
|
} |
86 |
|
glPopMatrix(); |
87 |
} |
} |
88 |
|
}; |
89 |
|
VOB_DEFINED(CallListCoorded); |
90 |
|
|
91 |
template<class T> void render(const T &t0, const T &t1) const { |
struct CallListBoxCoorded : public CallList { |
92 |
glBegin(GL_LINE_STRIP); |
enum { NTrans = 1 }; |
93 |
for(unsigned i=0; i+1<arr.size(); i+=2) { |
template<class T> void render(const T &t) const { |
94 |
ZPt p(arr[i], arr[i+1], 0); |
glPushMatrix(); |
95 |
coords1.vertex(p); |
if(t.performGL()) { |
96 |
|
Pt boxwh = t.getSqSize(); |
97 |
|
glScalef(boxwh.x, boxwh.y, 1.0); |
98 |
|
|
99 |
|
glCallList(no.get()); |
100 |
|
} else { |
101 |
|
std::cout << "Error: CallistCoorded with non-glperformable.\n"; |
102 |
} |
} |
103 |
glEnd(); |
glPopMatrix(); |
104 |
} |
} |
105 |
}; |
}; |
106 |
|
VOB_DEFINED(CallListBoxCoorded); |
107 |
|
|
|
VOB_DEFINED(StupidLinestrip); |
|
|
#endif |
|
|
|
|
|
#ifdef VOB_VOBS_DEFINING_VOB_DEFINED |
|
|
#undef VOB_DEFINED |
|
|
#endif |
|
108 |
|
|
109 |
}} |
}} |
110 |
|
|