HI Rafael,

I would have thought a CompositeViewer with one view/one window will
behave the same as Viewer with one window.  Viewer supports a wide
range of threading models, so I guess there is chance this might be a
deviation.  Try setting both to SingleThreaded and see what happens.

Robert.

On 6/6/07, Rafael Martinez <[EMAIL PROTECTED]> wrote:
Hi all,

I have been trying to get CEGUI working in windows during the last days.
The results are that, after many tests & Serge help,  it works in my multiple
monitor display when:

I set an osgViewer,
I make ,before creating the CEGUIDrawable,

  viewer.setUpViewOnSingleScreen(0);
  viewer.realize();
  viewer.renderingTraversals();

I remove in the original osgcegui example

        glPushAttrib and glPopAttrib functions

This works, but however, when I use a CompositeViewer, the CEGUI window
texture is lost (This also happens in a single display machine). Can someone
explain the differences between an osgViewer and an osgMultipleViewer with
just one view ???

I Include the main() of my CEGUI application in order than you can see what I
mean. In the code below, when undefining COMPLEX it works, in the other case
don't.

Thanks in advance,
Rafa.

--------- The code ---------------

int main( int argc, char **argv )
{
        #define COMPLEX

        osg::setNotifyLevel (osg::INFO);

#ifdef COMPLEX
        osgViewer::CompositeViewer viewer;
        osgViewer::View* view = new osgViewer::View;
        view->setUpViewOnSingleScreen(0);
        viewer.addView(view);
#else
        osgViewer::Viewer viewer;
        viewer.setUpViewOnSingleScreen(0);
#endif
        viewer.realize();
        viewer.renderingTraversals();

        osg::ref_ptr<osg::Node> loadedModel =
osgDB::readNodeFile("../data/cow.osg");
        osg::ref_ptr<osg::Group> group = new osg::Group;
        group->addChild(loadedModel.get());

        osg::ref_ptr<osg::Geode> geode = new osg::Geode;
        osg::ref_ptr<CEGUIDrawable> cd = new CEGUIDrawable();
        geode->addDrawable(cd.get());
        geode->setCullingActive(false);
        group->addChild(geode.get());

        cd->loadScheme("../data/CEGUI/schemes/TaharezLookSkin.scheme");
        cd->loadLayout("../data/CEGUI/layouts/TabControlDemo.layout");

#ifdef COMPLEX
        view->setSceneData(group.get());
        view->setCameraManipulator(new osgGA::TrackballManipulator());
#else
        viewer.setSceneData(group.get());
        viewer.setCameraManipulator(new osgGA::TrackballManipulator());
#endif
        while( !viewer.done() ) viewer.frame();
}
-------------------------------------


--
Rafael J. Martinez
Instituto de Robotica
Universitat de Valencia
Apdo. Correos 2085
Valencia 46071

http://www.uv.es/~rmtnez
Tel: (+34) 96 354 3564
Fax: (+34) 96 354 3550

Id. GnuPG: 0xBCFC8F5F
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to