MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoShader/Inventor/misc/SoGLCompleteShader.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 
00006 
00007 
00008 #ifndef  _SO_GLCOMPLETE_SHADER_
00009 #define  _SO_GLCOMPLETE_SHADER_
00010 
00011 #include "SoShaderSystem.h"
00012 #include <Inventor/SbBasic.h>
00013 #ifdef MEVISLAB
00014 #include <mlOpenGL.h>
00015 #else
00016 #include <Inventor/system/SbOpenGL.h>
00017 #endif
00018 
00019 #include "SoGLShaderProgram.h"
00020 
00021 class SoGLShaderObject;
00022 class SoGLTexture;
00023 
00025 SoEXTENDER class INVENTOR_SHADER_API SoGLCompleteShader : public SoGLShaderProgram
00026 {
00027 public:
00029   SoGLShaderObject  *m_pVertSh, 
00030                     *m_pGeomSh, 
00031                     *m_pFragSh;
00032 
00033 public:
00034   SoGLCompleteShader()
00035     : m_pVertSh(0)
00036     , m_pGeomSh(0)
00037     , m_pFragSh(0)
00038   {}
00039   ~SoGLCompleteShader();
00040 
00042   bool create(const char* srcVert, const char* srcGeom, const char* srcFrag);
00044   bool update(const char* srcVert, const char* srcGeom, const char* srcFrag);
00045   
00047   void bindTexture( const char* name, SoGLTexture* texture, int unit = -1);
00048 
00050   void enable(unsigned int context);
00051 
00053   void enable();
00054 
00056   bool isValid();
00057 };
00058 
00059 #endif  // _SO_GLCOMPLETE_SHADER_