VR-Forces 4.1 Class Documentation
DtReadFramebufferCallback.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
12 
14 
15 #include <osg/Camera>
16 
17 #include <vector>
18 #include <list>
19 
20 #include <boost/signal.hpp>
21 
22 namespace makVrv
23 {
24  class DtProcessImageTask;
25  class DtOsgChannel;
26 
31  : public osg::Camera::DrawCallback
32  {
33  public:
35  friend class DtVideoStream;
36 
38  virtual ~DtReadFramebufferCallback();
39 
41  virtual void operator()(osg::RenderInfo& renderInfo) const;
42 
43  protected:
44 
46  DtReadFramebufferCallback( DtDe& de, DtVideoStream& stream, DtOsgChannel* channel );
47 
49  virtual bool init();
50 
52  virtual void setupPixelBufferObjects( int numBuffers );
53 
55  virtual bool createProcessImageTask( DtDe& de, const DtVideoStream& stream );
56 
58  virtual bool setPixelFormatFromString( const DtUnicode& pxfString );
59 
61  virtual bool setReadBufferFromString( const DtUnicode& rbString );
62 
64  virtual bool setDataTypeFromString( const DtUnicode& dtString );
65 
66  private:
67  // Default CTOR (unimplemented)
69 
70  // Copy CTOR (unimplemented)
72 
73  // Assignment operator (unimplemented)
74  DtReadFramebufferCallback& operator=( const DtReadFramebufferCallback& orig );
75 
76  protected:
80 
81  double myFrequency;
82  double myLastCapture;
83 
85  int myWidth;
86  int myHeight;
87  int myX;
88  int myY;
89 
90  GLenum myPixelFormat;
91  GLenum myDataType;
92  GLenum myReadBuffer;
93 
94  std::vector<unsigned int> myPbos;
97  osg::ref_ptr<osg::Image> myImage;
99 
100  osg::GLBufferObject::Extensions* myGlExtensions;
102  };
103 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)