Fixing color balance, enabling vive controllers

This commit is contained in:
Brad Davis 2016-08-03 13:50:19 -07:00
parent 901e2da828
commit d8b0fee934
5 changed files with 10 additions and 7 deletions

View file

@ -1,7 +1,7 @@
set(TARGET_NAME display-plugins)
AUTOSCRIBE_SHADER_LIB(gpu display-plugins)
setup_hifi_library(OpenGL)
link_hifi_libraries(shared plugins ui-plugins gl gpu-gl ui)
link_hifi_libraries(shared plugins ui-plugins gl gpu-gl ui render-utils)
target_opengl()

View file

@ -374,7 +374,7 @@ void OpenGLDisplayPlugin::customizeContext() {
}
}
auto renderSize = getRecommendedRenderSize();
_compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create(gpu::Element::COLOR_SRGBA_32, renderSize.x, renderSize.y));
_compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create(gpu::Element::COLOR_RGBA_32, renderSize.x, renderSize.y));
_compositeTexture = _compositeFramebuffer->getRenderBuffer(0);
}

View file

@ -78,6 +78,10 @@ bool DebugHmdDisplayPlugin::internalActivate() {
}
void DebugHmdDisplayPlugin::updatePresentPose() {
float yaw = sinf(secTimestampNow()) * 0.25f;
float pitch = cosf(secTimestampNow()) * 0.25f;
// Simulates head pose latency correction
_currentPresentFrameInfo.presentPose = glm::mat4_cast(glm::angleAxis(sin(secTimestampNow()) * 0.25f, Vectors::UP)) * glm::mat4_cast(glm::angleAxis(cos(secTimestampNow()) * 0.25f, Vectors::RIGHT));
_currentPresentFrameInfo.presentPose =
glm::mat4_cast(glm::angleAxis(yaw, Vectors::UP)) *
glm::mat4_cast(glm::angleAxis(pitch, Vectors::RIGHT));
}

View file

@ -98,11 +98,11 @@ private:
bool _enablePreview { false };
bool _monoPreview { true };
bool _enableReprojection { true };
bool _firstPreview { true };
// bool _firstPreview { true };
float _previewAspect { 0 };
glm::uvec2 _prevWindowSize { 0, 0 };
qreal _prevDevicePixelRatio { 0 };
//glm::uvec2 _prevWindowSize { 0, 0 };
// qreal _prevDevicePixelRatio { 0 };
struct OverlayRenderer {
gpu::Stream::FormatPointer format;

View file

@ -45,7 +45,6 @@ static const QString RENDER_CONTROLLERS = "Render Hand Controllers";
const QString ViveControllerManager::NAME = "OpenVR";
bool ViveControllerManager::isSupported() const {
return false;
return openVrSupported();
}