MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoShader/Inventor/nodes/SoGLRenderState.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 
00006 
00007 
00008 #ifndef  _SO_GL_RENDER_STATE_
00009 #define  _SO_GL_RENDER_STATE_
00010 
00011 #include "SoShaderSystem.h"
00012 #include <Inventor/nodes/SoSubNode.h>
00013 #include <Inventor/fields/SoSFBool.h>
00014 #include <Inventor/fields/SoSFEnum.h>
00015 #include <Inventor/fields/SoSFFloat.h>
00016 #include <Inventor/system/SbOpenGL.h>
00017 
00019 class INVENTOR_SHADER_API SoGLRenderState : public SoNode
00020 {
00021    typedef SoNode inherited;
00022 
00023    SO_NODE_HEADER(SoGLRenderState);
00024 
00025    public:
00026 
00027       enum AttribSaveMode {
00028          PUSH = 1,
00029          POP = 2
00030       };
00031       
00032       enum CullMode {
00033          NONE           = 0,
00034          FRONT          = GL_FRONT,
00035          BACK           = GL_BACK,
00036          FRONT_AND_BACK = GL_FRONT_AND_BACK,
00037       };
00038       enum DepthFunction {
00039          NEVER         = GL_NEVER,
00040          LESS          = GL_LESS,
00041          EQUAL         = GL_EQUAL,
00042          LESS_EQUAL    = GL_LEQUAL,
00043          GREATER       = GL_GREATER,
00044          NOT_EQUAL     = GL_NOTEQUAL,
00045          GREATER_EQUAL = GL_GEQUAL,
00046          ALWAYS        = GL_ALWAYS
00047       };
00048       enum PolyMode {
00049          POINTS = GL_POINT,
00050          LINES  = GL_LINE,
00051          FILL   = GL_FILL
00052       };
00053 
00054       SoSFEnum   attribSaveMode;
00055       SoSFEnum   cullMode;
00056       SoSFBool   depthEnable;
00057       SoSFEnum   depthFunction;
00058       SoSFBool   writeMaskDepth;
00059       SoSFEnum   polyFrontMode;
00060       SoSFEnum   polyBackMode;
00061       SoSFFloat  lineWidth;
00062       SoSFBool   lineSmooth;
00063       SoSFBool   pointSprites;
00064       
00066       SoGLRenderState();
00067   
00068    SoEXTENDER public:
00069 
00071       virtual void GLRender(SoGLRenderAction *action);
00072  
00073    SoINTERNAL public:
00074   
00076       static void initClass();
00077 };
00078 
00079 #endif  // _SO_GL_RENDER_STATE_