8 #ifndef _OSG_OCULUSDEVICE_H_
9 #define _OSG_OCULUSDEVICE_H_
14 #include <OVR_CAPI_GL.h>
17 #include <osg/Texture2D>
18 #include <osg/Version>
19 #include <osg/FrameBufferObject>
25 OculusTextureBuffer(
const ovrSession& session, osg::ref_ptr<osg::State> state,
const ovrSizei&
size,
int msaaSamples);
42 void blitTexture(osg::State* state,
int width,
int height);
50 void setup(osg::State& state);
74 void blitTexture(osg::GraphicsContext* gc,
int width,
int height);
95 virtual void operator()(osg::RenderInfo& renderInfo)
const;
111 virtual void operator()(osg::RenderInfo& renderInfo)
const;
129 OculusDevice(
float nearClip,
float farClip,
const float pixelsPerDisplayPixel = 1.0f,
const float worldUnitsPerMetre = 1.0f,
const int samples = 0,
unsigned int mirrorTextureWidth = 960);
157 osg::Camera*
createRTTCamera(
OculusDevice::Eye eye, osg::Transform::ReferenceFrame referenceFrame,
const osg::Vec4& clearColor, osg::GraphicsContext* gc = 0)
const;
216 virtual void operator()(osg::RenderInfo& renderInfo)
const;