PR feedback

This commit is contained in:
Brad Davis 2016-02-16 16:26:17 -08:00
parent 56fc9ea301
commit d61f4fbb25
2 changed files with 4 additions and 34 deletions

View file

@ -15,9 +15,7 @@
#include <GLMHelpers.h>
#include <plugins/PluginContainer.h>
Q_DECLARE_LOGGING_CATEGORY(displayplugins)
Q_LOGGING_CATEGORY(displayplugins, "hifi.displayplugins")
#include "../Logging.h"
static const QString MONO_PREVIEW = "Mono Preview";
static const QString FRAMERATE = DisplayPlugin::MENU_PATH() + ">Framerate";
@ -87,34 +85,3 @@ void HmdDisplayPlugin::internalPresent() {
swapBuffers();
}
}
//// screen preview mirroring
//if (_enablePreview) {
// auto windowSize = toGlm(_window->size());
// if (_monoPreview) {
// // Find the aspect ratio for one eye
// auto eyeAspect = (float)(size.x / 2) / (float)size.y;
// auto windowAspect = (float)windowSize.x / (float)windowSize.y;
// if (eyeAspect < windowAspect) {
// Context::Viewport(windowSize.x * 2, windowSize.y);
// Context::Scissor(0, windowSize.y, windowSize.x, windowSize.y);
// } else {
//
// }
// } else {
// Context::Viewport(windowSize.x, windowSize.y);
// }
// glBindTexture(GL_TEXTURE_2D, _currentSceneTexture);
// GLenum err = glGetError();
// Q_ASSERT(0 == err);
// drawUnitQuad();
//}
///*
//The swapbuffer call here is only required if we want to mirror the content to the screen.
//However, it should only be done if we can reliably disable v-sync on the mirror surface,
//otherwise the swapbuffer delay will interefere with the framerate of the headset
//*/
//if (_enablePreview) {
// swapBuffers();
//}

View file

@ -59,6 +59,9 @@ void OpenVrDisplayPlugin::activate() {
_eyeOffsets[eye] = toGlm(_hmd->GetEyeToHeadTransform(eye));
_eyeProjections[eye] = toGlm(_hmd->GetProjectionMatrix(eye, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP, vr::API_OpenGL));
});
// FIXME Calculate the proper combined projection by using GetProjectionRaw values from both eyes
_cullingProjection = _eyeProjections[0];
}
_compositor = vr::VRCompositor();