On May 6, 2008, at 7:58 AM, Robert Osfield wrote:

Hi Mike,

On Mon, May 5, 2008 at 7:07 PM, Mike Logan <[EMAIL PROTECTED]> wrote:
We just ported to OSG-2.4.0   and  have several producer cfg files
 that we would like to keep using.

Arggg... if only you had tested one of the 2.3.x dev releases we could
have caught this before 2.4.0 went out..


I stand ashamed before you...

While testing on LInux, I noticed that the "Screen" keyword
 is parsed and the plugin seems to do the right thing,
 but in reality, its ignored.     The CFG plugin code seems ok,
 at least I don't see a problem..

Only screen :0.0  is used,   I can't get anything on  :0.1

Anyone seen this?

When I merged the plugin I didn't have my second head on so didn't
test it.  Looking at the code now (at thanks to having a second head
attached right now) and using your example .cfg I'm able to both
reproduce the problem, see where the source of the problem is and fix
it...  My prediction at your end is that you have DISPLAY env var set
to 0.0, could you do an env | grep DISPLAY to double check it.

What is happening is that the config conversion code is coverting the
Producer style RenderSurface code over to GraphicsContext::Traits then
checking the DISPLAY env var, overriding the Producer::RenderSurface
settings by any DISPLAY settings.  The clulprit code is in
src/osgPlugins/cfg/ReaderWriterCFG.cpp:

            osg::GraphicsContext::ScreenIdentifier si;
            si.readDISPLAY();

if (si.displayNum>=0) newtraits->displayNum = si.displayNum;
            if (si.screenNum>=0) newtraits->screenNum = si.screenNum;

If you put this in an #if 0 #endif block you should find things
working.  The attached ReaderWriterCFG.cpp has this applied.

I'm not yet sure of what the proper fix should be.  It might be
sufficient just to rely on the rest of the parser to check the DISPLAY
prior to reading from the .cfg file.

Could you test the changed file.


Yes, this does seem to work.

The only caveat (small) might be that producer used to accept
any number of cameras in the file WITHOUT the starting "CameraGroup {"
 and closing bracket.

 I don't know if that was a normal feature or bug in Producer.

Its clearly required now by the plugin because you get incorrect results without it. Seems like a reasonable requirement, I guess. You have a bunch of cameras,
 they should be in a camera-group, eh?

Nevertheless we're happy, and life can continue until the new .VIEW files
  get further along.

thank you!

ml



Robert.<ReaderWriterCFG.cpp>__________________________________________ _____
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users- openscenegraph.org

Michael Logan
Perot Systems Govt. Services / NASA Ames Res. Ctr.
MS 269-1, Moffett Field, CA, 94035  (650)-604-4494
Task Lead                       - Visual Cueing & Simulation
Task Lead - Human Manual & Operational Control Performance
Visualization Engineer - Adaptive Control Technologies

"If you want to start a revolution, don't pick up a gun.
 Do it with science and technology."  - Stanford R. Ovshinsky



_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to