C++ DX11 Render to panel
#1 Members - Reputation: 260
Posted 04 July 2012 - 03:04 AM
Best Regards
Miguel Petersen
My Blog - Cuboid Zone , a graphical framework.
#3 Members - Reputation: 1312
Posted 05 July 2012 - 02:12 AM
Hi guys, im currently making an editor, but im stuck with rendering into a panel from an existing Form(.NET Form(C++ of course)). I have tried to get the handle of the panel and using that instead, but it wont work...
How are you passing the panel handle to C++?
I do the same thing with my native C++ DX11 engine without problems. I have a managed C++ dll in the middle to make the binding easier.
#4 Members - Reputation: 260
Posted 05 July 2012 - 06:13 AM
Hi guys, im currently making an editor, but im stuck with rendering into a panel from an existing Form(.NET Form(C++ of course)). I have tried to get the handle of the panel and using that instead, but it wont work...
How are you passing the panel handle to C++?
I do the same thing with my native C++ DX11 engine without problems. I have a managed C++ dll in the middle to make the binding easier.
Thanks, i think i can get the handle from the panel, but, for now i get(when debugging) an error that im trying to write in a read protected area of the memory, which made me stuck. It happens when i create my shader objects, never happened before
.NET Form is not C++, it's some kind of dead-managed-cpp-garbage. The point is that it's managed, and it's garbage.
Try using SlimDX or any other kind of DX managed wrapper.
I got to use something, besides, Visual Studio is a really good IDE with form creations. Managed C++ is not garbage... Its still c++, but with some extra libraries, in my opinion.
My Blog - Cuboid Zone , a graphical framework.
#5 Members - Reputation: 1312
Posted 05 July 2012 - 07:42 AM
Thanks, i think i can get the handle from the panel, but, for now i get(when debugging) an error that im trying to write in a read protected area of the memory, which made me stuck. It happens when i create my shader objects, never happened before
I pass the panel Handle as IntPtr^ to managed C++ land, then covert to windows HWND like this:
hWnd=(HWND)handle->ToPointer();
before I send the HWND to unmanaged land.
#6 Members - Reputation: 260
Posted 05 July 2012 - 07:43 AM
Thanks, i think i can get the handle from the panel, but, for now i get(when debugging) an error that im trying to write in a read protected area of the memory, which made me stuck. It happens when i create my shader objects, never happened before
I pass the panel Handle as IntPtr^ to managed C++ land, then covert to windows HWND like this:
hWnd=(HWND)handle->ToPointer();
before I send the HWND to unmanaged land.
I do exactly the same. But, for now, i get this memory error!
My Blog - Cuboid Zone , a graphical framework.






