00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GLRENDERMODE_H
00019 #define GLRENDERMODE_H
00020
00021 #include "glscene.h"
00022
00027 namespace GLScene
00028 {
00029
00030 class GLRenderMode: public GLRenderState
00031 {
00032 unsigned int state;
00033 public:
00034
00035 GLRenderMode();
00036 GLRenderMode(unsigned int);
00037 GLRenderMode(const GLRenderMode&);
00038 virtual ~GLRenderMode();
00039
00040 SML_TAG(rendermode);
00041
00042 inline GLRenderMode& operator =(const GLRenderMode& rm)
00043 { state = rm.state; return *this; }
00044
00045 inline GLRenderMode& operator =(const unsigned int s)
00046 { state = s; return *this; }
00047
00048 inline const unsigned int operator &(const unsigned int val) const
00049 { return state & val; }
00050 inline const unsigned int operator ^(const unsigned int val) const
00051 { return state ^ val; }
00052 inline const unsigned int operator |(const unsigned int val) const
00053 { return state | val; }
00054 inline const unsigned int operator ~(void) const
00055 { return ~state; }
00056
00057 inline GLRenderMode& operator &=(const unsigned int val)
00058 { state = state & val; return *this; }
00059 inline GLRenderMode& operator ^=(const unsigned int val)
00060 { state = state ^ val; return *this; }
00061 inline GLRenderMode& operator |=(const unsigned int val)
00062 { state = state | val; return *this; }
00063
00064 const GLRenderMode operator +(const unsigned int val) const
00065 { return GLRenderMode(state + val); }
00066 const GLRenderMode operator -(const unsigned int val) const
00067 { return GLRenderMode(state - val); }
00068
00069 GLRenderMode& operator +=(const unsigned int val)
00070 { state += val; return *this; }
00071 GLRenderMode& operator -=(const unsigned int val)
00072 { state -= val; return *this; }
00073
00074 static const unsigned int POINTS;
00075 static const unsigned int WIRE;
00076 static const unsigned int CONTROL_POINTS;
00077 static const unsigned int FLAT;
00078 static const unsigned int SMOOTH;
00079 static const unsigned int TEXTURE;
00080 static const unsigned int SURFACE_NORMALS;
00081 static const unsigned int VERTEX_NORMALS;
00082 static const unsigned int SKELETAL;
00083 static const unsigned int VERTEX_ARRAY;
00084 static const unsigned int DISPLAY_LIST;
00085
00086 virtual void render() {};
00087
00088 };
00089 };
00090 #endif