Hi Sherman -- At my previous employer, we had a C++ app using ZAF, a cross-platform UI toolkit that was no longer supported and kind of buggy. We decided to modernize our app about the time VS2005 came out, and replace ZAF with Windows Forms and C#. The idea was to write an isolated UI that would interface with the C++ core module.
We found this to be a very painful process. As ZAF was C/C++-based, it interfaced easily with our app. However, C# has very different data types for things like String and even arrays (called Containers in C#). The bulk of our work consisted of writing routines that would reformat C# data types into C++ data types (and vice versa). Microsoft refers to this as "marshaling", which is a euphemism for "data copy" in our experience. Bottom line: it was a lot of work to produce code that ended up running sub-optimally. And don't even get me started on managed C++. After 6 months of development, 1 developer fulltime on this and 5 others parttime, we abandoned the project, having produced little more than a simple prototype. Our developer staff of C++ experts were all new to C#. Perhaps it's the case that most of this pain was caused by our own inexperience, but most of the C# and managed C++ documentation available did not address the issues we were encountering, so developing expertise was very difficult. If your app is C++-based, I encourage you to stick with C or C++ APIs. -Paul > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of sherman wilcox > Sent: Wednesday, February 13, 2008 9:33 PM > To: OpenSceneGraph Users > Subject: [osg-users] another one - osg and C# > > I've read a few posts and I'm a bit fuzzy on the subject. I > have an OSG app wrapped up in a C++ library. Now I need a UI. > I can attach this and drive this libarary from a console app, > MFC GUI, or even the standard Windows API, etc. - All in C++. > However, I'm considering using C#. I've heard lots of good > things about C# from a UI development perspective. From an > OSG/C# point of view - there seems to be lots of pain. > > I'm not a C# developer - it's all Greek to me - so what I'm > imagining may not be practical in reality hence this post. Is > it possible to link in my OSG app wrapped up in a C++ blanket > and use my own API from with a C# GUI? Is it painful? What > would I lose by going this route? > Is possible that at some point I won't be able to take > advantage of some latest OSG feature due to some unforeseen > incapability? My current UIs (I'm thinking of one MFC UI in > particular) don't really interact with the OSG - that's all > handled by my own C++ API. I'm just not sure how well all > this would glue together using C#. > > Can some of the veterans comment? > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

