Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-08 Thread Trajce Nikolov NICK
Glad it works. It can be few things. plugins not found (add the OpenSceneGraph/bin to your PATH), wrong path of the model Nick On Tue, Jul 8, 2014 at 10:33 AM, Bluish Joe wrote: > Hi Trajce, you where right: I was mixing debug and release libs, now I > fixed it and solved the problem!

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-08 Thread Bluish Joe
Hi Trajce, you where right: I was mixing debug and release libs, now I fixed it and solved the problem! Now I tried your code, it works well. Now I need to visualize a model in the viewer. You do setSceneData, passing the result of createHUD. What is createHUD? I tried a differente way: Code:

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-07 Thread Trajce Nikolov NICK
Hi Chris, > ... I've gotten an HWND from the managed side and created a context off of that in unmanaged C++ accessed via a C library wrapper. That is my suggested approach ( http://forum.openscenegraph.org/viewtopic.php?t=13944) as well. I did it for C# but it is same for managed C++. There are

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-07 Thread Chris Hanson
In the past, I've gotten an HWND from the managed side and created a context off of that in unmanaged C++ accessed via a C library wrapper. If you can't get this to work, I can give more details.​ ___ osg-users mailing list osg-users@lists.openscenegraph

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-07 Thread Trajce Nikolov NICK
I just did the same Win32 example and it works fine. Please, remove the comment from the RenderingThread since it is doing the rendering, otherwise you will not see the blue OSG window. Bellow is the code. As for the exceptions, I think you are mixing debug and release libs of OSG with your program

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-07 Thread Bluish Joe
Thanks Trajce, now I'm understanding something more. I tried using your code. I finally wrote a Win32 application (without CLR). This is the code: Code: #include "stdafx.h" #include "TestOsgVSWin32.h" #include #include #include #include const LPCWSTR g_szClassName = L"myWindowClass"; //

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-07 Thread Trajce Nikolov NICK
Hi Joe, the first exception I believe is something to do with mixing unmanaged with managed code (shouldn't be the qualifier 'unsafe' used??? - sorry, but don't know the tricks of mixing unmanaged with managed code) But, have a look here http://forum.openscenegraph.org/viewtopic.php?t=13944 , it

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-07 Thread Bluish Joe
Hi Trajce, very kind! It's managed C++ (even if I would finally use OSG in a C++Builder application, but I fear I will need to build OSG in Visual Studio and make a a wrapper...). I tried many examples. I haven't tried osgviewerMFC because I haven't got the Visual Studio project files (CMak

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-04 Thread Trajce Nikolov NICK
Hi Joe, is this for .NET Form? (C#,managed C++???) if so, have a look at the osgMFCViewer how it is done, you can achieve it same way. The basic is to get the windows handle of your form (the HWND) and to pass it on in the traits as inheriteddata . If you provide a code sample I might help you by

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2014-07-04 Thread Bluish Joe
I have the same issue (SEHException) and cannot find a way to embed OpenSceneGraph inside a Windows form. Anyone can help, please? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60153#60153 ___ osg-u

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2010-12-14 Thread Andreas Blassnig
Hi, I know this link, but the code doesn't work. I use VS2010 Prof. and OSG 2.8.3 The first problem is ::GetWindowRect( hwnd, &rect ); error LNK2028 Unresolved Token ... Defining a namespace namespace SysWin { [DllImport("user32.dll")] int GetWindowRect(HWND hwnd, RECT* rc

Re: [osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2010-12-10 Thread Glenn Waldron
Andreas, Read this; "control" is the WinForms control to which you want to attach the OSG viewer. http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ#HowdoIembedanOSGviewerina.NETcontrol Gl

[osg-users] Visual C++ CLR Windows Forms app using OpenSceneGraph

2010-12-10 Thread Andreas Blassnig
Hi, i work with osg for about 3 month now using it with win32 console apps and mfc. now i want to use an osg visualization window in a windows forms project as a small window in the main window. I am thinking of a panel or a picture box to define the rect for the visualization surface, but in t