From 49da612a4e5d7bdf2f5a550ec07296bd18ca72bc Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 20 Aug 2013 16:37:23 -0700 Subject: [PATCH] Turns out we do have to initialize the "odd frame" field. --- interface/src/Application.cpp | 2 ++ interface/src/renderer/GlowEffect.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index adc5bb1b71..4c169463a4 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2360,8 +2360,10 @@ void Application::displaySide(Camera& whichCamera) { if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { _myAvatar.getHead().setLookAtPosition(_myCamera.getPosition()); } + _glowEffect.begin(); _myAvatar.render(Menu::getInstance()->isOptionChecked(MenuOption::Mirror), Menu::getInstance()->isOptionChecked(MenuOption::AvatarAsBalls)); + _glowEffect.end(); _myAvatar.setDisplayingLookatVectors(Menu::getInstance()->isOptionChecked(MenuOption::LookAtVectors)); if (Menu::getInstance()->isOptionChecked(MenuOption::LookAtIndicator) && _isLookingAtOtherAvatar) { diff --git a/interface/src/renderer/GlowEffect.cpp b/interface/src/renderer/GlowEffect.cpp index 762ecd1271..77bb136b6d 100644 --- a/interface/src/renderer/GlowEffect.cpp +++ b/interface/src/renderer/GlowEffect.cpp @@ -15,11 +15,11 @@ #include "ProgramObject.h" #include "RenderUtil.h" -GlowEffect::GlowEffect() : _renderMode(DIFFUSE_ADD_MODE) { +GlowEffect::GlowEffect() : _renderMode(DIFFUSE_ADD_MODE), _isOddFrame(false) { } QOpenGLFramebufferObject* GlowEffect::getFreeFramebufferObject() const { - return (_renderMode == DIFFUSE_ADD_MODE && _isOddFrame) ? + return (_renderMode == DIFFUSE_ADD_MODE && !_isOddFrame) ? Application::getInstance()->getTextureCache()->getTertiaryFramebufferObject() : Application::getInstance()->getTextureCache()->getSecondaryFramebufferObject(); }