Hello Sergey,

I just wanted to let you know that CEGUI5.0 does indeed work with the following
line of code before the realize:
                        
viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
viewer->realize();

This will get the CEGUI rendering properly.
I've been working on getting CEGUI working in OSG2.2 now, and found this out the
hard way.

One other thing that you need to look out for is the coordinates for mouse x and
y which are injected int CEGUI.  The osgGA::GUIEventAdapter getX() and getY()
methods return a normalized x and y coordinate between -1 and +1. CEGUI on the
other hand needs to have this converted to an integer pixel range (0 to pixel
width / height), and the integer y coordinate needs to be flipped so that the
origin is the upper left hand corner (see Viewer.cpp, setX & setY).

You can turn on a CEGUI mouse pointer to see if it correctly follows your mouse
pointer by doing sometime along the lines of:
CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook","MouseArrow");

Best regards,
- Andrew



_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to