History

make GlowEffect support DependencyManager

ZappoMan committed 11 years ago

Commit e53833b1 parent 79bc5e017 files · +64 −32Browse files

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

Unified · Split

interface/src/Application.cpp+7−3
@@ -90,6 +90,8 @@ · 89 unmodified lines
9090 #include "gpu/Batch.h"
9191 #include "gpu/GLBackend.h"
9292
93+#include "renderer/GlowEffect.h"
94+
9395 #include "scripting/AccountScriptingInterface.h"
9496 #include "scripting/AudioDeviceScriptingInterface.h"
9597 #include "scripting/ClipboardScriptingInterface.h"
@@ -702,7 +704,7 @@ void Application::paintGL() { · 606 unmodified lines
702704 TV3DManager::display(*whichCamera);
703705
704706 } else {
705− _glowEffect.prepare();
707+ DependencyManager::get<GlowEffect>()->prepare();
706708
707709 // Viewport is assigned to the size of the framebuffer
708710 QSize size = DependencyManager::get<TextureCache>()->getPrimaryFramebufferObject()->size();
@@ -721,7 +723,7 @@ void Application::paintGL() { · 12 unmodified lines
721723 renderRearViewMirror(_mirrorViewRect);
722724 }
723725
724− _glowEffect.render();
726+ DependencyManager::get<GlowEffect>()->render();
725727
726728 {
727729 PerformanceTimer perfTimer("renderOverlay");
@@ -1913,7 +1915,6 @@ void Application::init() { · 1185 unmodified lines
19131915 _environment.init();
19141916
19151917 _deferredLightingEffect.init();
1916− _glowEffect.init();
19171918 _ambientOcclusionEffect.init();
19181919
19191920 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager
@@ -2036,6 +2037,9 @@ void Application::init() { · 116 unmodified lines
20362037
20372038 // make sure our texture cache knows about window size changes
20382039 DependencyManager::get<TextureCache>()->associateWithWidget(getGLWidget());
2040+
2041+ // initialize the GlowEffect with our widget
2042+ DependencyManager::get<GlowEffect>()->init(getGLWidget());
20392043 }
20402044
20412045 void Application::closeMirrorView() {

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