Hi Enrico, Enrico Borrione wrote: > Hi openSG users, > using my cave application I run into a small, yet unpleasant, problem. > > I have 3 servers, which use 3 separate viewports. > I create the viewports passing them the size, so they occupy one third of > the multi display window each: > > beginEditCP(mainShVprt); > { > ...stuff... > mainShVprt->setSize(left,0.0,right,1.0); > ...stuff... > } > endEditCP(mainShVprt); > > Where left and right for the three viewports are: > > Left Right > Server 0 0.0 1/NServers > Server 1 1/NServers 1/NServers * 2 > Server 2 1/NServers * 2 1.0
this is probably something like 1.0f/NServers, so that you get floating point division ? > The servers work correctly, except that the first and the last column of > pixels of every Server Window > display just a dirty buffer. > > Am I doing something wrong? no, this is how things should work, i.e. you should get viewports that are right next to each other. However in Viewport::getPixelLeft()/getPixelRight() the values are computed like this: return Int32(getParent()->getWidth() * getLeft()); return Int32(getParent()->getWidth() * getRight() - 1); so I'm wondering if this is a rounding problem, i.e. if the product above produces something 240.999 and the conversion to Int32 just chops off the .999 part, essentially giving you a 1 off error ? What is the width/height of the window you are using ? What values do you get from Viewport::getPixelLeft()/getPixelRight() for each viewport? regards, Carsten ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users