VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtExampleShaderManager.h
Go to the documentation of this file.
1 // /******************************************************************************
2 // ** Copyright (c) 2016 MAK Technologies, Inc.
3 // ** All rights reserved.
4 // ******************************************************************************/
5 
8 
9 #ifndef DtExampleShaderManager_H_
10 #define DtExampleShaderManager_H_
11 
12 #include <vrvCore/DtDe.h>
13 #include <vrvCore/DtUniqueID.h>
14 
15 #include <osg/ref_ptr>
16 
17 namespace osg
18 {
19  class StateSet;
20  class Uniform;
21 }
22 
23 namespace osgEarth
24 {
25  class VirtualProgram;
26 
27 }
28 
29 namespace makVrv
30 {
31 
35  {
36 
37  public:
38 
41  DtExampleShaderManager(DtDe& de, osg::StateSet *ss);
42 
44  virtual ~DtExampleShaderManager();
45 
46  //Function for changing the color that will be added to the fragments color
47  virtual void changeColorOverride(int color, float deltaChange);
48 
49  //Function for modifying the scale that will be applied to the model
50  virtual void changeScale(int axis, float deltaChange);
51 
52 
53  protected:
54 
56 
57  //model state set to attach the custom shaders to
58  osg::ref_ptr<osg::StateSet> myModelStateSet;
59 
60  //Uniforms used by the custom shaders
61  osg::ref_ptr<osg::Uniform> myColorToAdd;
62  osg::ref_ptr<osg::Uniform> myScale;
63 
64  //virtual program for the stateset
65  osg::ref_ptr<osgEarth::VirtualProgram> myVirtualProgram;
66 
67  };
68 
69 }
70 
71 #endif

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)