@@ -19,7 +19,7 @@ void ofApp::update(){
1919
2020 // now, send position texture to clients
2121 posPingPong.src ->readToPixels (sendPixels);
22- server.sendBinary ((char *)sendPixels.getPixels (), sendPixels.size () * sendPixels.getBytesPerChannel () );
22+ server.sendBinary ((char *)sendPixels.getData (), sendPixels.size () * sendPixels.getBytesPerChannel () );
2323}
2424
2525// --------------------------------------------------------------
@@ -79,8 +79,8 @@ void ofApp::setupGPUParticles(){
7979 }
8080 // Load this information in to the FBO's texture
8181 posPingPong.allocate (textureRes, textureRes,GL_RGB32F);
82- posPingPong.src ->getTextureReference ().loadData (pos, textureRes, textureRes, GL_RGB);
83- posPingPong.dst ->getTextureReference ().loadData (pos, textureRes, textureRes, GL_RGB);
82+ posPingPong.src ->getTexture ().loadData (pos, textureRes, textureRes, GL_RGB);
83+ posPingPong.dst ->getTexture ().loadData (pos, textureRes, textureRes, GL_RGB);
8484 delete [] pos; // Delete the array
8585
8686
@@ -93,12 +93,12 @@ void ofApp::setupGPUParticles(){
9393 }
9494 // Load this information in to the FBO's texture
9595 velPingPong.allocate (textureRes, textureRes,GL_RGB32F);
96- velPingPong.src ->getTextureReference ().loadData (vel, textureRes, textureRes, GL_RGB);
97- velPingPong.dst ->getTextureReference ().loadData (vel, textureRes, textureRes, GL_RGB);
96+ velPingPong.src ->getTexture ().loadData (vel, textureRes, textureRes, GL_RGB);
97+ velPingPong.dst ->getTexture ().loadData (vel, textureRes, textureRes, GL_RGB);
9898 delete [] vel; // Delete the array
9999
100100 // Loading and setings of the variables of the textures of the particles
101- sparkImg.loadImage (" spark.png" );
101+ sparkImg.load (" spark.png" );
102102 imgWidth = sparkImg.getWidth ();
103103 imgHeight = sparkImg.getHeight ();
104104
@@ -137,8 +137,8 @@ void ofApp::updateGPUParticles(){
137137 velPingPong.dst ->begin ();
138138 ofClear (0 );
139139 updateVel.begin ();
140- updateVel.setUniformTexture (" backbuffer" , velPingPong.src ->getTextureReference (), 0 ); // passing the previus velocity information
141- updateVel.setUniformTexture (" posData" , posPingPong.src ->getTextureReference (), 1 ); // passing the position information
140+ updateVel.setUniformTexture (" backbuffer" , velPingPong.src ->getTexture (), 0 ); // passing the previus velocity information
141+ updateVel.setUniformTexture (" posData" , posPingPong.src ->getTexture (), 1 ); // passing the position information
142142 updateVel.setUniform1i (" resolution" , (int )textureRes);
143143 updateVel.setUniform2f (" screen" , (float )width, (float )height);
144144 updateVel.setUniform1f (" timestep" , (float )timeStep);
@@ -159,8 +159,8 @@ void ofApp::updateGPUParticles(){
159159 posPingPong.dst ->begin ();
160160 ofClear (0 );
161161 updatePos.begin ();
162- updatePos.setUniformTexture (" prevPosData" , posPingPong.src ->getTextureReference (), 0 ); // Previus position
163- updatePos.setUniformTexture (" velData" , velPingPong.src ->getTextureReference (), 1 ); // Velocity
162+ updatePos.setUniformTexture (" prevPosData" , posPingPong.src ->getTexture (), 0 ); // Previus position
163+ updatePos.setUniformTexture (" velData" , velPingPong.src ->getTexture (), 1 ); // Velocity
164164 updatePos.setUniform1f (" timestep" ,(float ) timeStep );
165165
166166 // draw the source position texture to be updated
@@ -184,8 +184,8 @@ void ofApp::updateGPUParticles(){
184184 renderFBO.begin ();
185185 ofClear (0 ,0 ,0 ,0 );
186186 updateRender.begin ();
187- updateRender.setUniformTexture (" posTex" , posPingPong.dst ->getTextureReference (), 0 );
188- updateRender.setUniformTexture (" sparkTex" , sparkImg.getTextureReference () , 1 );
187+ updateRender.setUniformTexture (" posTex" , posPingPong.dst ->getTexture (), 0 );
188+ updateRender.setUniformTexture (" sparkTex" , sparkImg.getTexture () , 1 );
189189 updateRender.setUniform1i (" resolution" , (float )textureRes);
190190 updateRender.setUniform2f (" screen" , (float )width, (float )height);
191191 updateRender.setUniform1f (" size" , (float )particleSize);
0 commit comments