From d3cdbc389a4c7d3fda287ebe4ac440b0ccb4e051 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 11 Jun 2015 15:05:08 -0700 Subject: [PATCH] Code cleanup --- interface/src/devices/OculusManager.cpp | 24 ------------------------ interface/src/ui/ApplicationOverlay.cpp | 21 +-------------------- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/interface/src/devices/OculusManager.cpp b/interface/src/devices/OculusManager.cpp index 2ee62c85f3..414c7f6199 100644 --- a/interface/src/devices/OculusManager.cpp +++ b/interface/src/devices/OculusManager.cpp @@ -629,35 +629,11 @@ void OculusManager::display(QGLWidget * glCanvas, RenderArgs* renderArgs, const finalFbo = DependencyManager::get()->getPrimaryFramebuffer(); glBindFramebuffer(GL_FRAMEBUFFER, 0); } - - //glBindFramebuffer(GL_DRAW_FRAMEBUFFER, gpu::GLBackend::getFramebufferID(finalFbo)); - ////Render each eye into an fbo - //for_each_eye(_ovrHmd, [&](ovrEyeType eye) { - // _activeEye = eye; - // // Update our camera to what the application camera is doing - // _camera->setRotation(toGlm(eyeRenderPose[eye].Orientation)); - // _camera->setPosition(toGlm(eyeRenderPose[eye].Position)); - // configureCamera(*_camera); - // glMatrixMode(GL_PROJECTION); - // glLoadMatrixf(glm::value_ptr(_camera->getProjection())); - - // glMatrixMode(GL_MODELVIEW); - // glLoadIdentity(); - - // ovrRecti & vp = _eyeTextures[eye].Header.RenderViewport; - // vp.Size.h = _recommendedTexSize.h * _offscreenRenderScale; - // vp.Size.w = _recommendedTexSize.w * _offscreenRenderScale; - - // glViewport(vp.Pos.x, vp.Pos.y, vp.Size.w, vp.Size.h); - //}); - //glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); - // restore our normal viewport glViewport(0, 0, deviceSize.width(), deviceSize.height()); diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index e5f701e807..887af89cd0 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -242,24 +242,6 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) { _framebufferObject->release(); } -// A quick and dirty solution for compositing the old overlay -// texture with the new one -//template -//void with_each_texture(GLuint firstPassTexture, GLuint secondPassTexture, F f) { -// glEnable(GL_TEXTURE_2D); -// glActiveTexture(GL_TEXTURE0); -// if (firstPassTexture) { -// glBindTexture(GL_TEXTURE_2D, firstPassTexture); -// f(); -// } -// //if (secondPassTexture) { -// // glBindTexture(GL_TEXTURE_2D, secondPassTexture); -// // f(); -// //} -// glBindTexture(GL_TEXTURE_2D, 0); -// glDisable(GL_TEXTURE_2D); -//} - gpu::PipelinePointer ApplicationOverlay::getDrawPipeline() { if (!_standardDrawPipeline) { auto vs = gpu::ShaderPointer(gpu::Shader::createVertex(std::string(standardTransformPNTC_vert))); @@ -977,7 +959,6 @@ void ApplicationOverlay::buildHemiVertices( vec3 pos; // Compute vertices positions and texture UV coordinate // Create and write to buffer - //_hemiVertices->(sizeof(vec3) + sizeof(vec2) + sizeof(vec4)) * stacks * slices); for (int i = 0; i < stacks; i++) { float stacksRatio = (float)i / (float)(stacks - 1); // First stack is 0.0f, last stack is 1.0f // abs(theta) <= fov / 2.0f @@ -1052,7 +1033,7 @@ void ApplicationOverlay::buildFramebufferObject() { auto canvasSize = qApp->getCanvasSize(); QSize fboSize = QSize(canvasSize.x, canvasSize.y); if (_framebufferObject != NULL && fboSize == _framebufferObject->size()) { - // Already build + // Already built return; }