Eulerian Smoke Simulation on the GPU
|
00001 #ifndef __IMAGE_UNIT_STACK_H__ 00002 #define __IMAGE_UNIT_STACK_H__ 00003 00004 //--------------------------------------------------------------------- 00007 //--------------------------------------------------------------------- 00008 00009 #include <vector> 00010 #include "GLUtil.h" 00011 00020 class ImageUnit 00021 { 00022 public : 00024 int m_samplerIndex; 00026 bool m_isAvailable; 00027 00031 inline ImageUnit( 00032 int _samplerIndex, 00033 bool _isAvailable 00034 ) : 00035 m_samplerIndex(_samplerIndex), 00036 m_isAvailable(_isAvailable){;} 00037 }; 00038 00047 class ImageUnitStack 00048 { 00049 public: 00051 ImageUnitStack(); 00052 00054 ~ImageUnitStack(); 00055 00057 int getNextAvailableUnit(); 00058 00061 void freeUnit( 00062 int _unitIndex 00063 ); 00064 00065 private: 00068 std::vector<ImageUnit*> m_stack; 00069 }; 00070 00071 #endif // __IMAGE_UNIT_STACK_H__