VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtPerViewUniformCallback.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvOsg/vrvOsg.h>
12 
13 #include <osg/Drawable>
14 
15 namespace makVrv
16 {
19  class DtPerViewUniformCallback : public osg::Drawable::DrawCallback
20  {
21  public:
24 
26  DtPerViewUniformCallback(const DtPerViewUniformCallback&,const osg::CopyOp&);
27 
29 
31  virtual ~DtPerViewUniformCallback();
32 
34  virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const;
35 
37  void setValue(const osg::View* v, int val);
38 
40  float getValue(const osg::View* v) const;
41 
42  protected:
43 
45  GLuint findLocation(const osg::Program::PerContextProgram* program);
46 
47  protected:
48  typedef std::pair<const osg::Program::PerContextProgram*, GLuint> ProgramKey;
49  typedef std::map<ProgramKey, GLuint> ProgramToUniformLoc;
51 
52  typedef std::map<const osg::View*, float> ViewToValue;
54  };
55 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)