/[libvob]/libvob/include/vob/vobs/Trivial.hxx
ViewVC logotype

Diff of /libvob/include/vob/vobs/Trivial.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by tjl, Sat Mar 8 19:45:47 2003 UTC revision 1.10 by tjl, Tue Mar 11 11:24:28 2003 UTC
# Line 34  Trivial.hxx Line 34  Trivial.hxx
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    
# Line 75  struct CallList { Line 74  struct CallList {
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    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26