Paul Melis wrote:
Frank van Meurs wrote:
Paul Melis wrote:
Hi Frank,
Frank van Meurs wrote:
I've managed to compile OSG (a while ago already) and would now like
to use it in my own project. I'm using wxWidgets (2.8.9) for the GUI
and would like to have OSG render to a wxGLCanvas. There's links to
some examples of this approach on the wiki, which suggests that it's
easily doable. However, all examples seem to be broken as they were
written for older versions of OSG or rely on other packages.
The osgviewerWX example, for instance, breaks on the fact that it
relies on osgViewer::StatsHandler, which seems to have moved
somewhere else
Which version of OSG are you using? The example should compile
correctly with 2.6
Paul
Hi Paul,
I'm using OSG version 2.6.1. The error is triggered by
viewer->addEventHandler(new osgViewer::StatsHandler);
which is called in the process of creating and setting variables for
an osgViewer::Viewer which is subsequently added to the the wxFrame
subclass through SetViewer().
The error, leaving out the system specifics, is:
error C2039: 'StatsHandler' : is not a member of 'osgViewer'
Strange, as osgviewerWX.cpp includes <osgViewer/ViewerEventHandlers>,
which is where the StatsHandler class is defined...
Ah, that did the trick. Thanks! Silly me I guess. I had the include at
the start of the wxOSGCanvas class I was using. I derived it from the
original code (as I already had the wxwidgets code) and must have
overlooked that. Thinking about it, that's probably where the
OSGVIEWER_EXPORT macro comes into play then.
OK, so now it does compile. Great! :) However, my question still stands,
if anybody could point me to some documentation on OSG which describes
how OpenSceneGraph works, why it works that way and consequently what
one needs to do in writing programs. Some documentation which would make
me /understand/ what I'm doing.
Cheers,
Frank
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org