On 10/12/2010 6:46 AM, Holger Carsten Krumm wrote:
> first of all my regards to this community here. OSG is a great API for using 
> 3D graphics on a high level and seeing the supportive nature of the guys 
> here, it is overwhelming!
> I got a question, being a not-so-deeply-involved programmer.
> Can someone give me some information about using OSG in a ANSI C program? Is 
> it easily possible to wrap OSG in "extern" function calls to make it happen? 
> Or do I have to expect major culprits?

   You're insane.

> Don't ask why I do not migrate the whole source: it is a pretty big bunch of 
> C code and porting it is not an option at the moment...
> Any pointer or opinion is appreciated!

  I'd write C++ code that uses OSG. Then, I would make the function(s) that 
call into that
code, (like setupScene() and drawStuff() or cleanup()) be extern "C" wrapped, 
and just
call those from your C code.

  BTW, Almost all C code compiles fine without problems in C++ mode. There's 
hardly ever
any 'porting' involved. But as I mentioned above, there' no problem having a 
few C++
pieces in your C program.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
    "There is no Truth. There is only Perception. To Perceive is to Exist." - 
Xen
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to