proj home

Files   Classes   Functions   Hierarchy  

graphicsImmediateDeferredSwitch.cpp

Go to the documentation of this file.
00001 #include <graphicsImmediateDeferredSwitch.h>
00002 
00003 
00004 void graphicsImmediateDeferredSwitch::toggle(uintc index)
00005 {
00006   assert(index<gswitches.size());
00007 
00008   gswitches[index]->toggle();
00009 }
00010 
00011 void graphicsImmediateDeferredSwitch::pushdeferred
00012 (
00013   uint & index, 
00014   gobj* p
00015 )
00016 {
00017   assert(p);
00018 
00019   index = gswitches.size();
00020   gswitches.push_back(new gobjSwitch<>(p,true,false));
00021   graphicsDeferred.push(gswitches[index]);
00022 }
00023 
00024 graphicsImmediateDeferredSwitch::~graphicsImmediateDeferredSwitch()
00025 {
00026   for (uint i=0; i<gswitches.size(); ++i)
00027   {
00028     delete gswitches[i]->x;
00029     gswitches[i]->x=0;
00030   }
00031 }
00032 
00033 
00034 void graphicsImmediateDeferredSwitch::pushimmediate(uint & index, gobj* p)
00035 {
00036   index = gswitches.size();
00037   gswitches.push_back(new gobjSwitch<>(p,true,false));
00038   graphicsImmediate.push(gswitches[index]);
00039 }
00040  
00041 
00042 boolc graphicsImmediateDeferredSwitch::isdrawn(uintc index) const
00043 {
00044   assert(index<gswitches.size());
00045 
00046   return gswitches[index]->isdrawn;
00047 }
00048 

Generated on Fri Mar 4 00:49:27 2011 for Chelton Evans Source by  doxygen 1.5.8