Jump to content

  • Log In with Google      Sign In   
  • Create Account


C++ DX11 Render to panel


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 MiniMigi   Crossbones+   -  Reputation: 1431

Like
0Likes
Like

Posted 04 July 2012 - 03:04 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...

Best Regards
Miguel Petersen

Sponsor:

#2 iYossi   Members   -  Reputation: 128

Like
-2Likes
Like

Posted 05 July 2012 - 02:06 AM

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

#3 kunos   Crossbones+   -  Reputation: 2184

Like
0Likes
Like

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.
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#4 MiniMigi   Crossbones+   -  Reputation: 1431

Like
0Likes
Like

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 Posted Image

.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.Posted Image

#5 kunos   Crossbones+   -  Reputation: 2184

Like
0Likes
Like

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 Posted Image


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
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#6 MiniMigi   Crossbones+   -  Reputation: 1431

Like
0Likes
Like

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 Posted Image


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!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS