VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgStateComponent.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 #include <osg/Referenced>
14 #include <osg/ref_ptr>
15 #include <string>
16 
17 namespace osg
18 {
19  class StateSet;
20 }
21 
22 namespace makVrv
23 {
24  //TODO: put this is a separate file [h/cxx] file?
25 
26  class DtDe;
27 
28 
33  class DT_DLL_VRVOSG DtOsgStateComponentContext : public osg::Referenced
34  {
35  public:
38 
39  //todo: doc
40  void setShaderFolderPath(const std::string& path);
41 
42  //todo: doc
43  const std::string& getShaderFolderPath() const;
44 
45  protected:
46 
48  virtual ~DtOsgStateComponentContext();
49 
50  std::string myShaderFolderPath;
51 
53  };
54 
56 
61  class DT_DLL_VRVOSG DtOsgStateComponent : public osg::Referenced
62  {
63  public:
65  DtOsgStateComponent(DtDe& de, const DtOsgStateComponentContext* context =0L);
66 
68  const DtOsgStateComponentContext* getContext() const;
69 
71  virtual bool install(osg::StateSet* stateset) =0;
72 
74  virtual bool uninstall(osg::StateSet* stateset) =0;
75 
76  protected:
77 
79  virtual ~DtOsgStateComponent();
80 
82  std::string loadShaderSource(const std::string& strFileName) const;
83 
84  private:
85  osg::ref_ptr<const DtOsgStateComponentContext> myContext;
86 
88 
90  };
91 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)