Files Classes Functions Hierarchy
#include <tessD2draw02.h>
Public Member Functions | |
| tessD2draw02multicolor (TESS &tess_, bool &isdrawn_) | |
| Constructor. | |
| void | draw () |
| Draw to the global graphics stream. | |
Public Attributes | |
| bool & | isdrawn |
| Toggle the display. | |
| double | blend |
| The alpha component. | |
Assumes the tessellation has anti-clockwise winding.
Definition at line 96 of file tessD2draw02.h.
| tessD2draw02multicolor< TESS, PT, INDX >::tessD2draw02multicolor | ( | TESS & | tess_, | |
| bool & | isdrawn_ | |||
| ) | [inline] |
| void tessD2draw02multicolor< TESS, PT, INDX >::draw | ( | ) | [inline, virtual] |
Draw to the global graphics stream.
Implements gobj.
Definition at line 239 of file tessD2draw02.h.
References gobj::global, gobjpush, tessD2draw02multicolor< TESS, PT, INDX >::isdrawn, gobjContainer::push(), and gobjContainer::set().
00240 { 00241 gobjContainer * preserve = gobjContainer::global; 00242 00243 gobjContainer & y = * new gobjContainer(true); 00244 y.set(); 00245 00246 y.push( new gobjglPushAttrib(GL_CURRENT_BIT)); 00247 y.push( new gobjglPushAttrib(GL_LIGHTING_BIT)); 00248 00249 y.push(new gobjglDisable(GL_LIGHTING)); 00250 y.push( new gobjglEnable(GL_BLEND)); 00251 y.push( new gobjglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); 00252 00253 y.push( new gobjglBegin(GL_TRIANGLES)); 00254 00255 INDX const imax = tess.vi.size(); 00256 for (INDX i=1; i<imax; ++i) 00257 drawtriangle(tess.vi[i],tess.pts); 00258 00259 y.push( new gobjglEnd()); 00260 00261 y.push( new gobjglPopAttrib()); 00262 y.push( new gobjglPopAttrib()); 00263 00264 gobjSwitch<bool&> * s = 00265 new gobjSwitch<bool&>(&y,isdrawn); 00266 00267 // Restore 00268 gobjContainer::global = preserve; 00269 00270 gobjpush(s); 00271 }
| double tessD2draw02multicolor< TESS, PT, INDX >::blend |
| bool& tessD2draw02multicolor< TESS, PT, INDX >::isdrawn |
Toggle the display.
Definition at line 102 of file tessD2draw02.h.
Referenced by tessD2draw02multicolor< TESS, PT, INDX >::draw().
1.5.8