VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSdsmDrawCallback.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 #include <osg/Camera>
14 
15 namespace makVrv
16 {
17  struct SdsmDrawCallback : public osg::Camera::DrawCallback
18  {
20  SdsmDrawCallback(bool bindFbo, GLenum colorAttachment, unsigned int numPipelines, unsigned int numPartitions, unsigned int width, unsigned int height);
21 
23  virtual ~SdsmDrawCallback();
24 
26  virtual void operator () (osg::RenderInfo& renderInfo) const;
27 
29  float minDepth() const;
30 
32  float maxDepth() const;
33 
35  float minDepth(unsigned int splitIndex) const;
36 
38  float maxDepth(unsigned int splitIndex) const;
39 
41  osg::Vec2 partition(unsigned int splitIndex) const;
42 
44  bool isSDSMDepthAvailable() const;
45  private:
46  mutable std::vector<osg::Vec2> myPartitions;
47  mutable unsigned int myFBOBufferIndex;
48  mutable std::vector<unsigned int> myPBOBufferIndex;
49  mutable unsigned int myCurrentPBOIndex;
50  mutable unsigned int myColorTextureIndex;
51  mutable unsigned int myDepthRBOBufferIndex;
53  bool myBindFbo;
54  unsigned int myWidth;
55  unsigned int myHeight;
56  mutable float myMinDepth;
57  mutable float myMaxDepth;
58  mutable float myMinDepthArray[20];
59  mutable float myMaxDepthArray[20];
60  mutable bool mySDSMDepthAvailable;
61  };
62 
63 
64  struct PostDrawSDSMCallback : public osg::Camera::DrawCallback
65  {
68 
69  // Callback Method to unbind the currently bound framebuffer object
70  virtual void operator () (osg::RenderInfo& renderInfo) const;
71  };
72 }

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)