C++ DX11 Render to panel
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
Best Regards
Miguel Petersen
.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.
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.
[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
.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.
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.
[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
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!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement