I see there are a few others trying to get the osgcegui sample up and
running with the latest osg and the latest Crazy Eddies GUI on the
osg-users mailing list.  I have managed to get both CEGUI 0.7.1 and OSG
2.9.7 working together and I have attached an updated cpp file to
demonstrate how to instrument both APIs. 

 

The current osgcegui sample doesn't appear to have a CMakeLists.txt and
therefore no project files are generated to build and run the example on
its own.  I'm no cmake expert so my code update does not address that
problem.  All of my own testing of this code required the manual
creation of a Visual Studio project.  Aside from the dependencies
required to setup a basic osg::Viewer window, CEGUIBase.lib and
CEGUIOpenGLRender.lib must be linked against and the cegui include
directories must also be added to list of include directories.

 

This fix still requires the viewer to be single threaded; this is a
limitation of CEGUI.  The scope of this code submission is to get the
osgcegui sample working with the latest osg and the latest cegui.

 

What this sample does differently from the original example is that it
will create a "hello world" window in code rather than loading the
layout from xml.   This was done to lower the number of external sample
files required to demonstrate CEGUI in osg.   The CEGUIEventCallback
struct has been updated to properly consume events (return true) when
input events are triggered over GUI windows (e.g., no rotation of a
model in the 3d scene when the mouse drag is actually dragging a
window).  A separate createHud method was also added to the sample to
create a separate camera for all CEGUI rendering.

 

The last caveat here is that the windowing theme used in this sample
requires the datafile locations that accompany the CEGUI library
download to be specified in the CEGUIDrawable::initializeResourceDirs
function.  This is required to properly lookup the scheme used in the
sample.

 

Please let me know if you have any further questions or comments.  This
is my first submission to this list, so hopefully everything is up to
your Protocol standards.

 

Thanks,

Alex

 

This communication, along with any attachments, is covered by federal and state 
law governing electronic communications and may contain company proprietary and 
legally privileged information.  If the reader of this message is not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, use or copying of this message is strictly prohibited.  If you 
have received this in error, please reply immediately to the sender and delete 
this message.  Thank you.

Attachment: osgcegui.cpp
Description: osgcegui.cpp

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

Reply via email to