VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDrawFBOCallback.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 
14 #include <osg/Camera>
15 #include <osg/FrameBufferObject>
16 
17 class DtCVSpan;
18 class DtCVMarkerSeries;
19 
20 namespace osg
21 {
22  class RenderInfo;
23 }
24 
25 namespace makVrv
26 {
27  struct DT_DLL_VRVOSG PreDrawFBOCallback : public osg::Camera::DrawCallback
28  {
30  PreDrawFBOCallback( osg::FrameBufferObject* fbo);
31  virtual ~PreDrawFBOCallback();
32 
34  virtual void operator () (osg::RenderInfo& renderInfo) const;
35 
37  void enableBindFbo(bool bind);
38 
39  void setProfileSubsystem(const char * profName) {
40  myProfileSubsystem = profName;
41  }
42  void setProfileFunction(const char * funcName) {
43  myProfileFunction = funcName;
44  }
45 
46  virtual void endDrawPass(osg::RenderInfo& renderInfo);
47 
48  private:
49  osg::ref_ptr<osg::FrameBufferObject> mySharedFbo;
51  std::string myProfileSubsystem;
52  // owned externally so that comparisons work.
53  const char * myProfileFunction;
54  mutable DtCVSpan * mySpan;
56  };
57 
58 
59  struct DT_DLL_VRVOSG PostDrawFBOCallback : public osg::Camera::DrawCallback
60  {
63 
65  virtual void operator () (osg::RenderInfo& renderInfo) const;
66 
68  void setRestoreDrawBuffer(GLenum bufferAttachment);
69 
71  void setRestoreReadBuffer(GLenum bufferAttachment);
72 
74  void enableUnbindFbo(bool unbind);
75 
77  void setPredrawCallback(PreDrawFBOCallback * predraw_callback) {
78  myPreDrawCallback = predraw_callback;
79  }
80 
81  private:
85 
87  };
88 
89 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)