summaryrefslogtreecommitdiff
path: root/src/testApp.cpp
diff options
context:
space:
mode:
authorTim <tim@Admins-Mac-Pro-2.local>2013-06-19 14:18:35 +0100
committerTim <tim@Admins-Mac-Pro-2.local>2013-06-19 14:18:35 +0100
commit24bd98136d3c946ca5e5738cf990e20fd13b95dc (patch)
tree0e3cd90ebb2c4b9532ff111b12da22eb34d07039 /src/testApp.cpp
parentd035816f49ad9d8d7ae42d5e1aec7207cd84820e (diff)
MakfileHEADmaster
Diffstat (limited to 'src/testApp.cpp')
-rw-r--r--src/testApp.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/testApp.cpp b/src/testApp.cpp
index 9aff6c9..7c97e53 100644
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -117,19 +117,19 @@ void testApp::setup(){
camWidth=720;
camHeight=576;
grabber.initGrabber(camWidth,camHeight);
- gammamap=new unsigned char[256];
- line1=new unsigned char[camWidth];
- line2=new unsigned char[camWidth];
- outBuffer=new unsigned char[camWidth*camHeight*3];
-
- whitePt=0.9;
- blackPt=0.3;
+ gammamap=new unsigned char[256];
+ line1=new unsigned char[camWidth];
+ line2=new unsigned char[camWidth];
+ outBuffer=new unsigned char[camWidth*camHeight*3];
+
+ whitePt=0.9;
+ blackPt=0.3;
gamma=1.0;
//calc gamma map
- for (int i=0;i<256;i++){
- float ewp=max(whitePt,blackPt+0.1f); //limit range to 0.1
- gammamap[i]=(unsigned char)(pow(min(1.0f,max(0.0f,(((float(i)/255.0f)-blackPt)/(ewp-blackPt)))),gamma)*255.0);
+ for (int i=0;i<256;i++){
+ float ewp=max(whitePt,blackPt+0.1f); //limit range to 0.1
+ gammamap[i]=(unsigned char)(pow(min(1.0f,max(0.0f,(((float(i)/255.0f)-blackPt)/(ewp-blackPt)))),gamma)*255.0);
}
outTexture.allocate(camWidth,camHeight, GL_RGB);
@@ -140,7 +140,7 @@ void testApp::setup(){
// blanker.loadImage("black.png");
-
+ fullScreen=false;
setMidiState();
}
@@ -304,8 +304,8 @@ void testApp::draw(){
if (B_glitch) {
- //glEnable(GL_BLEND);
- //glBlendFunc(GL_CONSTANT_COLOR,GL_ONE);
+ //glEnable(GL_BLEND);
+ //glBlendFunc(GL_CONSTANT_COLOR,GL_ONE);
//glBlendColor(1.0f,1.0f,1.0f,0.9f);
//blanker.draw(0,0,ofGetWidth(),ofGetHeight());
}
@@ -533,6 +533,10 @@ void testApp::keyPressed (int key){
if(key == 'f'){
showFPS=!showFPS;
}
+ if(key == ' '){
+ fullScreen=!fullScreen;
+ ofSetFullscreen(fullScreen);
+ }
}
//--------------------------------------------------------------
@@ -819,7 +823,7 @@ void testApp::setMidiState(){
}
/*
-void sendNoteOn(int channel, int id, int value);
+void sendNoteOn(int channel, int id, int value);
void sendNoteOff(int channel, int id, int value);
void sendControlChange(int channel, int id, int value);
*/