Improvements to openvr code

- Overlays are implemented (sans input for the moment)
- Fixed a problem where the movemanager was using the wrong values for hmd rotation & position
This commit is contained in:
James Urquhart 2016-05-14 23:51:04 +01:00
parent 185fde8ea4
commit da6bcbeb2b
13 changed files with 380 additions and 32 deletions

View file

@ -176,7 +176,7 @@ void GuiOffscreenCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = tr
GFX->setWorldMatrix( MatrixF::Identity );
GFX->setViewMatrix( MatrixF::Identity );
GFX->setProjectionMatrix( MatrixF::Identity );
RectI contentRect(Point2I(0,0), mTargetSize);
{
// Render active GUI Dialogs
@ -210,7 +210,7 @@ void GuiOffscreenCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = tr
GFX->getDrawUtil()->clearBitmapModulation();
}
mTarget->resolve();
GFX->popActiveRenderTarget();
@ -219,6 +219,13 @@ void GuiOffscreenCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = tr
// Keep track of the last time we rendered.
mLastRenderMs = Platform::getRealMilliseconds();
mTargetDirty = mDynamicTarget;
onFrameRendered();
}
void GuiOffscreenCanvas::onFrameRendered()
{
}
Point2I GuiOffscreenCanvas::getWindowSize()

View file

@ -23,6 +23,7 @@ public:
void onRemove();
void renderFrame(bool preRenderOnly, bool bufferSwap);
virtual void onFrameRendered();
Point2I getWindowSize();