VR-Forces 4.3 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvVideoStream
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
11
#include <
vrvVideoStream/vrvVideoStream.h
>
12
13
#include <
vrvVideoStream/DtVideoStream.h
>
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
30
class
DT_DLL_VRVVIDEOSTREAM
DtReadFramebufferCallback
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)
68
DtReadFramebufferCallback
();
69
70
// Copy CTOR (unimplemented)
71
DtReadFramebufferCallback
(
const
DtReadFramebufferCallback
& rhs );
72
73
// Assignment operator (unimplemented)
74
DtReadFramebufferCallback
& operator=(
const
DtReadFramebufferCallback
& orig );
75
76
protected
:
77
DtVideoStream
&
myStream
;
78
DtDe
&
myDe
;
79
DtOsgChannel
*
myChannel
;
80
81
double
myFrequency
;
82
double
myLastCapture
;
83
84
bool
myUseReadPixels
;
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
;
95
int
myWriteIndex
;
96
int
myReadIndex
;
97
osg::ref_ptr<osg::Image>
myImage
;
98
DtProcessImageTask
*
myTask
;
99
100
osg::GLBufferObject::Extensions*
myGlExtensions
;
101
bool
myIsInitialized
;
102
};
103
}
Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)