History

Merge branch 'master' of https://github.com/highfidelity/hifi

Andrzej Kapolka committed 12 years ago

Commit 5bdad182 parents 7f6b3d3 594238630 files · +539 −358Browse files

Showing the changes to interface/src/Application.cpp (1 of 30 files). Show all

Unified · Split

interface/src/Application.cpp+12−15
@@ -589,8 +589,6 @@ void Application::paintGL() { · 588 unmodified lines
589 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);589 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
590 PerformanceWarning warn(showWarnings, "Application::paintGL()");590 PerformanceWarning warn(showWarnings, "Application::paintGL()");
591 591
592 const bool glowEnabled = Menu::getInstance()->isOptionChecked(MenuOption::EnableGlowEffect);
593
594 // Set the desired FBO texture size. If it hasn't changed, this does nothing.592 // Set the desired FBO texture size. If it hasn't changed, this does nothing.
595 // Otherwise, it must rebuild the FBOs593 // Otherwise, it must rebuild the FBOs
596 if (OculusManager::isConnected()) {594 if (OculusManager::isConnected()) {
@@ -665,16 +663,11 @@ void Application::paintGL() { · 68 unmodified lines
665 updateShadowMap();663 updateShadowMap();
666 }664 }
667 665
668 //If we aren't using the glow shader, we have to clear the color and depth buffer666 if (OculusManager::isConnected()) {
669 if (!glowEnabled) {
670 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
671 } else if (OculusManager::isConnected()) {
672 //Clear the color buffer to ensure that there isnt any residual color667 //Clear the color buffer to ensure that there isnt any residual color
673 //Left over from when OR was not connected.668 //Left over from when OR was not connected.
674 glClear(GL_COLOR_BUFFER_BIT);669 glClear(GL_COLOR_BUFFER_BIT);
675 }670
676
677 if (OculusManager::isConnected()) {
678 //When in mirror mode, use camera rotation. Otherwise, use body rotation671 //When in mirror mode, use camera rotation. Otherwise, use body rotation
679 if (whichCamera.getMode() == CAMERA_MODE_MIRROR) {672 if (whichCamera.getMode() == CAMERA_MODE_MIRROR) {
680 OculusManager::display(whichCamera.getRotation(), whichCamera.getPosition(), whichCamera);673 OculusManager::display(whichCamera.getRotation(), whichCamera.getPosition(), whichCamera);
@@ -687,9 +680,7 @@ void Application::paintGL() { · 6 unmodified lines
687 TV3DManager::display(whichCamera);680 TV3DManager::display(whichCamera);
688 681
689 } else {682 } else {
690 if (glowEnabled) {683 _glowEffect.prepare();
691 _glowEffect.prepare();
692 }
693 684
694 glMatrixMode(GL_MODELVIEW);685 glMatrixMode(GL_MODELVIEW);
695 glPushMatrix();686 glPushMatrix();
@@ -697,9 +688,7 @@ void Application::paintGL() { · 1 unmodified line
697 displaySide(whichCamera);688 displaySide(whichCamera);
698 glPopMatrix();689 glPopMatrix();
699 690
700 if (glowEnabled) {691 _glowEffect.render();
701 _glowEffect.render();
702 }
703 692
704 if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {693 if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
705 renderRearViewMirror(_mirrorViewRect);694 renderRearViewMirror(_mirrorViewRect);
@@ -2809,6 +2798,10 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 2103 unmodified lines
2809 _stars.render(whichCamera.getFieldOfView(), whichCamera.getAspectRatio(), whichCamera.getNearClip(), alpha);2798 _stars.render(whichCamera.getFieldOfView(), whichCamera.getAspectRatio(), whichCamera.getNearClip(), alpha);
2810 }2799 }
2811 2800
2801 if (Menu::getInstance()->isOptionChecked(MenuOption::Wireframe)) {
2802 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
2803 }
2804
2812 // draw the sky dome2805 // draw the sky dome
2813 if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) {2806 if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) {
2814 PerformanceTimer perfTimer("atmosphere");2807 PerformanceTimer perfTimer("atmosphere");
@@ -2947,6 +2940,10 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 132 unmodified lines
2947 _overlays.render3D();2940 _overlays.render3D();
2948 }2941 }
2949 }2942 }
2943
2944 if (Menu::getInstance()->isOptionChecked(MenuOption::Wireframe)) {
2945 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
2946 }
2950}2947}
2951 2948
2952void Application::updateUntranslatedViewMatrix(const glm::vec3& viewMatrixTranslation) {2949void Application::updateUntranslatedViewMatrix(const glm::vec3& viewMatrixTranslation) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t