VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgShaderCache.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <map>
15 #include <set>
16 #include <string>
17 
18 #include <osg/ref_ptr>
19 #include <osg/Shader>
20 #include <osg/Program>
21 
22 typedef std::set<std::string> SetShaderDefines;
23 typedef std::map<std::string, std::string> MapShaderDefines;
24 
25 typedef std::map<std::string, osg::ref_ptr<osg::Shader> > MapNamesToShaders;
26 typedef std::set<osg::ref_ptr<osg::Program> > SetPrograms;
27 
28 namespace makVrv
29 {
31  {
32  public:
34  virtual ~DtOsgShaderCache();
35 
36  osg::ref_ptr<osg::Shader> getOrCreateShader(
37  const std::string& strFileName
38  , const SetShaderDefines& setShaderDefines
39  , const MapShaderDefines& mapShaderDefines
40  , osg::Shader::Type type);
41 
42  osg::ref_ptr<osg::Shader> getOrCreateShader(
43  const std::string& strFileName1
44  , const std::string& strFileName2
45  , const SetShaderDefines& setShaderDefines
46  , const MapShaderDefines& mapShaderDefines
47  , osg::Shader::Type type);
48 
49  osg::ref_ptr<osg::Program> getOrCreateProgram(
50  osg::ref_ptr<osg::Shader> vertexShader
51  , osg::ref_ptr<osg::Shader> pixelShader);
52  private:
55  };
56 }

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)