VR-Forces Development_Version 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 
30  class DT_DLL_VRVOSG DtOsgStateComponentContext : public osg::Referenced
31  {
32  public:
35 
36  //todo: doc
37  void setShaderFolderPath(const std::string& path);
38 
39  //todo: doc
40  const std::string& getShaderFolderPath() const;
41 
42  protected:
43 
45  virtual ~DtOsgStateComponentContext();
46 
47  std::string myShaderFolderPath;
48  };
49 
50 
55  class DT_DLL_VRVOSG DtOsgStateComponent : public osg::Referenced
56  {
57  public:
60 
62  const DtOsgStateComponentContext* getContext() const;
63 
65  virtual bool install(osg::StateSet* stateset) =0;
66 
68  virtual bool uninstall(osg::StateSet* stateset) =0;
69 
70  protected:
71 
73  virtual ~DtOsgStateComponent();
74 
76  std::string loadShaderSource(const std::string& strFileName) const;
77 
78  private:
79  osg::ref_ptr<const DtOsgStateComponentContext> myContext;
80  };
81 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)