From 7ebbce5e53efce80bc48fa6f492451df4107e8b5 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 18 Nov 2018 01:26:53 +0000 Subject: alpha mode --- gui/src/ofApp.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'gui/src/ofApp.cpp') diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index 5c148be..feb3893 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -1,4 +1,4 @@ -#include "ofApp.h" + #include "ofApp.h" #include "glew.h" @@ -366,10 +366,22 @@ void ofApp::keyPressed(ofKeyEventArgs &args){ ofSetFullscreen(outputFS); } if(args.key == 'a'){ - bool add=!sets[0].additive;; + int which=int(sets[0].additive)+(int(sets[0].alpha)*2); + bool add=false; + bool alpha=false; + switch(which){ + case 0: + add=true; + break; + case 1: + alpha=true; + break; + } sets[0].additive=add; sets[1].additive=add; - printf("Additive: %s \n",add?"true":"false"); + sets[0].alpha=alpha; + sets[1].alpha=alpha; + printf("Additive: %s Alpha: %s\n",add?"true":"false",alpha?"true":"false"); } if(args.key >='1' && args.key <= '9'){ //sets[0].decayFactor = 1.0f + ( -- cgit v1.2.3