Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <vl/Shader.hpp>#include <vl/GLSL.hpp>#include <vl/Light.hpp>#include <vl/ClipPlane.hpp>#include <vl/OpenGLContext.hpp>#include <vl/Log.hpp>#include <vl/Say.hpp>Defines | |
| #define | GET_OR_CREATE(RS) |
| #define | GET_OR_CREATE_IDX(RS, index) |
| #define GET_OR_CREATE | ( | RS ) |
RS* rs = dynamic_cast<RS*>( gocRenderStateSet()->renderState( RS_##RS ) ); \ if ( rs == NULL ) \ { \ rs = new RS; \ gocRenderStateSet()->setRenderState( rs ); \ } \ return rs;
| #define GET_OR_CREATE_IDX | ( | RS, | |
| index | |||
| ) |
RS* rs = dynamic_cast<RS*>( gocRenderStateSet()->renderState( (ERenderState)(RS_##RS##0 + index) ) ); \ if ( rs == NULL ) \ { \ rs = new RS(index); \ gocRenderStateSet()->setRenderState( rs ); \ } \ return rs;