OSG can definitely be used with WinForms. It sounds like you're running into some project configuration issue though. If you can post your error messages we might be able to provide better help.
-Mike > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of ijustfu > Sent: Thursday, August 02, 2007 4:25 AM > To: [email protected] > Subject: [osg-users] A simple question from an learner. > > Dear Robert. > I build a simple OSG program with visual studio2005.net. I use c++ > language , and select "window forms application", then get the following > codes: > > #include "stdafx.h" > #include "Form1.h" > > #include <osgViewer/Viewer> > #include <osgDB/ReadFile> > > using namespace VGEForPRDAirPollution; > > [STAThreadAttribute] > int main(array<System::String ^> ^args) > { > // Enabling Windows XP visual effects before any controls are > created > Application::EnableVisualStyles(); > Application::SetCompatibleTextRenderingDefault(false); > // Create the main window and run it > Application::Run(gcnew Form1()); > > osgViewer::Viewer viewer; > viewer.setSceneData(osgDB::readNodeFile("cow.osg")); > return viewer.run(); > } > > After adding osgViewerd.lib and osgDBd.lib into project, compile it but > fund > so many warnings and errors. > > Above codes can be run under 'win32 console application'(c++). > > Does above means OSG can not be used under "window forms application"? If > yes, is there any setting of solution environment? > > Thanks. > Bingli > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

