C++ DX11 Render to panel

Started by
4 comments, last by Migi0027 11 years, 9 months ago
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...

Best Regards
Miguel Petersen

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

Advertisement
.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.

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.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni


[quote name='Migi0027' timestamp='1341392688' post='4955569']
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.
[/quote]

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 dry.png


.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.mellow.png

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/


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 dry.png



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.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni


[quote name='Migi0027' timestamp='1341490380' post='4955942']
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 dry.png



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.
[/quote]

I do exactly the same. But, for now, i get this memory error!

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

This topic is closed to new replies.

Advertisement