static void mainThread(void) { // do some animation in the main thread. static Real64 t = 0.0; if(OSG::getSystemTime() - t > 2.0) { // create a wave in the center of the plane. startWave(-1, -1, 0.1); t = OSG::getSystemTime(); } calcWave(); updateGeometry(_geo); calcVertexNormals(_geo); }
void testApp::update(){ calcWave(); }
//-------------------------------------------------------------- void testApp::update(){ calcWave(); //this is where all the calculations happen, so we place it in update }