summaryrefslogtreecommitdiff
path: root/03_play
diff options
context:
space:
mode:
authorTim <tim@Admins-Mac-Pro-2.local>2013-06-19 20:03:17 +0100
committerTim <tim@Admins-Mac-Pro-2.local>2013-06-19 20:03:17 +0100
commitcdd0e0b630bd3a5a8ba15dbce7f5e03221b72f92 (patch)
tree4ada26f9bf3d4e0bdb97889472e95729433518a6 /03_play
parent4fdd082d9a5657b0f9c613d47c2c58cea366a2e6 (diff)
working on performance version
Diffstat (limited to '03_play')
-rw-r--r--03_play/src/testApp.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/03_play/src/testApp.cpp b/03_play/src/testApp.cpp
index 3095a18..02b7901 100644
--- a/03_play/src/testApp.cpp
+++ b/03_play/src/testApp.cpp
@@ -1,5 +1,8 @@
#include "testApp.h"
+//next.
+//the real project
+
//texture binding with normalised coords
void bindTexture(ofBaseHasTexture &t) {
ofTexture &tex = t.getTextureReference();
@@ -73,7 +76,7 @@ void testApp::setup() {
camera.setPosition(0,0,-500);
camera.lookAt(target,ofVec3f(0,1,0));
- point_texture.loadImage("spriteA.png");
+ //point_texture.loadImage("spriteA.png");
}
@@ -89,13 +92,13 @@ void testApp::startPlayers(){
//openNIPlayers[deviceID].setPaused(true);
- //soundplayer.stop();
+ soundplayer.stop();
- //if (recs[playing].audio!=""){
- // soundplayer.loadSound(recs[playing].audio);
- // soundplayer.play();
- // soundplayer.setPosition(offset);
- //}
+ if (recs[playing].audio!=""){
+ soundplayer.loadSound(recs[playing].audio);
+ soundplayer.play();
+ soundplayer.setPosition(offset);
+ }
}
}
@@ -131,12 +134,12 @@ void testApp::draw(){
- glActiveTexture(GL_TEXTURE0);
- glEnable( GL_TEXTURE_2D );
+ //glActiveTexture(GL_TEXTURE0);
+ //glEnable( GL_TEXTURE_2D );
//glTexEnv(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
//glTexEnv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
//glBindTexture(GL_TEXTURE_2D, texture_name);
- bindTexture(point_texture);
+ //bindTexture(point_texture);
//ofEnablePointSprites();
for (int deviceID = 0; deviceID < numDevices; deviceID++){
@@ -187,7 +190,7 @@ void testApp::draw(){
//for (int j=0;j<openNIPlayers[deviceID].getHeight();j+=20) {
- for (int o=0;o<2000;o++) { //100 new points per frame
+ for (int o=0;o<100;o++) { //100 new points per frame
int i=ofRandom(openNIPlayers[deviceID].getWidth());
int j=ofRandom(openNIPlayers[deviceID].getHeight());
@@ -248,7 +251,7 @@ void testApp::draw(){
}
//ofDisablePointSprites();
- unbindTexture(point_texture);
+ //unbindTexture(point_texture);
ofSetColor(255, 255, 255);
string msg = "MILLIS: " + ofToString(ofGetElapsedTimeMillis());