created postFX functions in main and added a postFX pass to sgct engine to allow for a global fade after executing certain scripts.

added global opacity member variable with set/get methods in render engine.
added two VERY simple shaders used in the post FX pass. Note these are not handled in openspace so updating files does not update shader
This commit is contained in:
Joakim Kilby
2015-02-20 11:19:50 +01:00
parent f4dcfc07ec
commit 468bb98e46
5 changed files with 115 additions and 1 deletions

View File

@@ -175,6 +175,7 @@ namespace openspace {
, _performanceMemory(nullptr)
, _visualizeABuffer(false)
, _visualizer(nullptr)
, _globalOpactity(1.f)
{
}
@@ -607,6 +608,14 @@ namespace openspace {
return _abuffer;
}
float RenderEngine::globalOpacity(){
return _globalOpactity;
}
void RenderEngine::setGlobalOpacity(float opacity){
_globalOpactity = opacity;
}
void RenderEngine::generateGlslConfig() {
LDEBUG("Generating GLSLS config, expect shader recompilation");
int xSize = sgct::Engine::instance()->getActiveWindowPtr()->getXFramebufferResolution();;