Code cleanup

This commit is contained in:
Brad Davis 2015-06-11 15:05:08 -07:00
parent b7cd1ea72a
commit d3cdbc389a
2 changed files with 1 additions and 44 deletions

View file

@ -629,35 +629,11 @@ void OculusManager::display(QGLWidget * glCanvas, RenderArgs* renderArgs, const
finalFbo = DependencyManager::get<TextureCache>()->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());

View file

@ -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 <typename F>
//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;
}