Turns out we do have to initialize the "odd frame" field.

This commit is contained in:
Andrzej Kapolka 2013-08-20 16:37:23 -07:00
parent ecc6d41523
commit 49da612a4e
2 changed files with 4 additions and 2 deletions

View file

@ -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) {

View file

@ -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();
}