rem: UInt32 i;
context: void display(void){    Time t;    t=-getSystemTime();    beginEditCP( cam_trans );    if(animate && animPos.size()>1)    {        UInt32 i=(UInt32)animTime;        Real32 a=animTime-i;        printf("%d %d\n",i,animPos.size());        Vec3f v=animPos[i] + (animPos[i+1] - animPos[i]) * a;         cam_trans->getMatrix().setTranslate(v[0],v[1],v[2]);        cam_trans->getMatrix().setRotate(            Quaternion::slerp(animOri[i],animOri[i+1],a));    }    else    {        cam_trans->getSFMatrix()->setValue( tball.getFullTrackballMatrix() );    }    endEditCP( cam_trans );    try    {        clusterWindow->activate();	        clusterWindow->frameInit();	        clusterWindow->renderAllViewports(ract);	        if(showInfo)        {            displayInfo(10,90);/*            char text[1024];            sprintf(text,"FPS:        %12.1f",1.0/frame_time);            showText(10,70,text);            sprintf(text,"Positions:  %12d",sum_positions);            showText(10,50,text);            sprintf(text,"Triangles:  %12d",sum_triangles);            showText(10,30,text);            sprintf(text,"Geometries: %12d",sum_geometries);            showText(10,10,text);*/        }        clusterWindow->swap();	        clusterWindow->frameExit();	        // clear changelist from prototypes        OSG::Thread::getCurrentChangeList()->clearAll();	}    catch(OSG_STDEXCEPTION_NAMESPACE::exception &e)    {        std::cout << e.what() << std::endl;        exit(0);    }        t+=getSystemTime();    frame_time = t;    if(animate)    {        Real32 a;        UInt32 i;        Vec3f v;        printf("Frame %8.3f %8.5f %8.3f\n",               animTime,               t,1/t);        animTime += (animPos.size()/(float)animLength);        if(int(animTime)+1 >= animPos.size())        {            animTime = 0;            if(animLoops > 0)            {                animLoops--;                if(!animLoops)                 {                    subRefCP(clusterWindow);                    osgExit();                     exit(0);                }            }        }    }}