DI-Guy C++ SDK Reference  13.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguyOsgGraphicsShaderProgram.h
Go to the documentation of this file.
1 #ifndef diguyOsgGraphicsShaderProgram_h__
2 #define diguyOsgGraphicsShaderProgram_h__
3 
4 
5 /*********************************************************************
6  **
7  *2 diguyOsgGraphicsShaderProgram
8  **
9  */
10 
12 
13 #include <osg/Program>
14 #include <osg/Shader>
15 
16 /**********************************************************************
17  **
18  ** Class declaration. diguyOsgGraphicsShaderProgram publicly inherits
19  ** diguyGraphicsShaderProgram. Virtual functions are declared for some of
20  ** the virtual functions in the base class.
21  */
23 {
24 
25 public:
26 
27  diguyOsgGraphicsShaderProgram(void* internal_data);
29 
30  virtual int load_vertex_shader_source(const char* filename);
31  virtual int load_pixel_shader_source(const char* filename);
32  virtual int reload();
33  virtual int link();
34 
35  osg::Program* get_program() {return m_program.get();}
36 
37 
38 
39 protected:
40 
41  char m_vertex_shader_filename[512];
43 
44  osg::ref_ptr<osg::Program> m_program;
45  osg::ref_ptr<osg::Shader> m_vertex_shader;
46  osg::ref_ptr<osg::Shader> m_fragment_shader;
47 
48 };
49 
50 
56 
57 #endif // diguyOsgGraphicsShaderProgram_h__