Dirk Reiners wrote: > Hi Manuel, > > [EMAIL PROTECTED] wrote: >> Hi together. >> >> Because my new Job "forced" be to learn C# and .NET I am in it right >> a > bit. And now I'm interessted in the opportunity to combine C# and > OpenSG. Is there someone out there who managed this before? Is there an > example in the sources of OpenSG? Or is it possible to get one (this > question goes to Dirk ;-) ) > > I'm not aware of any existing C# bindings, and honestly I have no clue > what would be involved in doing them (I have very little clue about C# > in general).
I did quite a bit of work writing .NET bindings for VR Juggler, and as part of that, I wrote a code generator to handle the bulk of the work. Since VR Juggler requires end-user extension, it is necessary for the application programmer to be able to write at least one class in a .NET language that derives from from a natively compiled (i.e., unmanaged) C++ class, and an instance of that type has to be passed to more natively compiled C++ code for actual execution. Allowing that is where things get tricky because P/Invoke is needed to bridge the language barrier and allow for virtual function overrides in the .NET language. > I know Allen has made some good progress with pyOpenSG (which uses the 2 > branch), even though it was a little painful to get there, we could > probably add some insight. That might take a while, though, he's going > to be very busy privately starting in the next few days. At least he's > used to not getting much sleep. ;) > > In general OpenSG is not too binding-unfriendly, you could create > bindings from the fcd files or from the internal reflective API for most > parts, and manually create some for the basic types. But it's going to > be a non-trivial amount of work, not something to do in an afternoon if > you're targeting anything remotely generic. If end-user extension is not required, SWIG can probably do the job. A quick glance at the SWIG website tells me that just two weeks ago, a SWIG release was made that has directors for C#. My understanding is that directors allow for the type of user-level extension that my code generator supports. -Patrick -- Patrick L. Hartling | VP Engineering, Infiscape Corp. PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
