Look into the MFC examples of osg. osg/examples/osgviewerMFC.

/Anders


On 8/2/07, ijustfu <[EMAIL PROTECTED]> wrote:
> 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.org
>


-- 


________________________________________________________________
 Anders Backman               Email:    [EMAIL PROTECTED]
 HPC2N/VRlab                  Phone:    +46 (0)90-786 9936
 Umea university              Cellular: +46 (0)70-392 64 67
 S-901 87 UMEA SWEDEN         Fax:      +46 90-786 6126
                               http://www.cs.umu.se/~andersb
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to