Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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 Migi0027 (肉コーダ)   Crossbones+   -  Reputation: 3001

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

Hi!

Game-Dev Journal: www.gamedev.net/blog/1882-the-cuboid-zone/

Wordpress Journal: cuboidzone.wordpress.com/


Sponsor:

#2 iYossi   Members   -  Reputation: 137

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: 2224

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.

#4 Migi0027 (肉コーダ)   Crossbones+   -  Reputation: 3001

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

Hi!

Game-Dev Journal: www.gamedev.net/blog/1882-the-cuboid-zone/

Wordpress Journal: cuboidzone.wordpress.com/


#5 kunos   Crossbones+   -  Reputation: 2224

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.

#6 Migi0027 (肉コーダ)   Crossbones+   -  Reputation: 3001

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!

Hi!

Game-Dev Journal: www.gamedev.net/blog/1882-the-cuboid-zone/

Wordpress Journal: cuboidzone.wordpress.com/





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