Hello Levi,
Levi Swartzentruber wrote:
> Hello,
>
> I want to use an open source terrain loader called Demeter to load and render
> terrain in an OpenSG program. I could not get it to work in the original
> context, so I tried to get it to work in a simple OpenSG sample program. The
> code for OpenSGNav.cpp is where the modifications were made and is included at
> the end of the email.
well, I'm not sure if throwing vrjuggler additionally into the mix
really makes things easier, but ok...
> One of the first problems I encountered was trying to use
> the custom elevation loaders to load the data and then attach it to the scene
> graph. So I had to work around the drawing and call the necessary functions
> directly. In this way, it would compile but give me a segmentation fault at
> the
> following line:
>
> glActiveTextureARB(GL_TEXTURE0_ARB);
could you provide a backtrace for that seg fault, otherwise it is a bit
difficult to get an idea of what goes wrong and where ?
> I check immediately before this line for any GL errors and find none. I think
> one of the problems is that Demeter is built with OSG and there may be some
> compatibility issue there. If I put the Demeter code I have into an OSG
> sample
> program, it works. I would appreciate any feedback on what I am doing wrong
> and
> how to fix it.
I don't know Demeter and taking a quick look at their website it seems
not to really depend on OpenSceneGraph - at least not for rendering -
which means it is probable that it can be integrated with OpenSG. The
right way to do that would be to write a NodeCore that derives from
Drawable and registers itself with the RenderAction to do the drawing.
In OpenSG/Source/Contrib/Terrain is an implementation of a Terrain
NodeCore, but it does not use Demeter.
Creating new NodeCores requires that you write an .fcd file (a little
xml file that describes the fields of the type) and use the fcdEdit
program to generate some Base classes. In OpenSG/Examples/NewTypes are
examples.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users