Hello,
See the following code lines :
//display function (glut main loop)
display ()
{
...
static int toto = 1024;
//for all my declared viewport
for (list<ViewportPtr>::iterator it = viewports.begin();
it != viewports.end();
it++)
{
//I doesn't do anything if the viewport is not a ShadowMapViewport
if (ShadowMapViewportPtr::dcast((*it)) != NullFC)
if (ShadowMapViewportPtr::dcast((*it))->getShadowOn())
{
ShadowMapViewportPtr smvp= ShadowMapViewportPtr::dcast((*it));
cout << " toto : " << toto << " - ";
cout << " Old : " << smvp->getMapSize() << " - ";
beginEditCP(ssmvp);
//here I change the Map Size
ssmvp->setMapSize(toto);
endEditCP(ssmvp);
cout << " New : "<< smvp->getMapSize() << endl;
}
}
toto +=1;
if (toto > 2000)
toto = 1024;
bsManager->render();
Thread::getCurrentChangeList()->clearAll();
glClear(GL_COLOR_BUFFER_BIT) ;
glutSwapBuffers() ;
}
result :
in the terminal I can see incremental values of the Map Size :
for example :
toto : 1025 - Old : 1024 - New : 1025
toto : 1026 - Old : 1025 - New : 1026
....
But when I print the Map Size value in the Shadow Map function which
calculate the shadows, the value stay at 1024,
it change once (the first time display function is excuted) and never more.
The Map Size is an example, with other variables there is the same
trouble : impossible to update viewport values more than once.
Have you any solutions ??
Thanks in advance,
Michael
PS 1: it's a cluster application (one client and two visual servers).
display it's in the client code.
PS 2: Thanks for all your old answers.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users