Hello,
In order to translate the 3D rendering part of code of a WindowsFrom application (.Net/C#), i'm looking for a 3D OO sdk. Ogre seems to me to contain much features i like (scene manager, OO,...). Following this sample (https://github.com/OGRECave/ogre/tree/m ... les/Csharp), i succeeded to build and run the code under VS2019, but unfortunatly this is a console application.
So, i wonder how to render in a windows.Form or better in a Windows.Form Control.
Someone can help?
regards
Pascal
ogre Windows.Form Control
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1075
- Contact:
Re: ogre Windows.Form Control
you need to obtain the window handle and pass it to Ogre - similarly to what is done with Qt here:
https://github.com/OGRECave/ogre/blob/m ... t.cpp#L119
https://github.com/OGRECave/ogre/blob/m ... t.cpp#L119
-
- Gnoblar
- Posts: 2
- Joined: Wed Jul 15, 2020 2:20 pm
Re: ogre Windows.Form Control
Hello,
thanks for your link, Paroj
unfortunately, i don't see how to do this. I succeeded to open a Ogre window from a windowsForm, but all cases there is always a new window (not a WindowsForm) that is opened; impossible to create an Ogre view inside a Form, and a fortiori in a Control.
Is there somewhere a little simple sample that shows how to do this?
regards
thanks for your link, Paroj
unfortunately, i don't see how to do this. I succeeded to open a Ogre window from a windowsForm, but all cases there is always a new window (not a WindowsForm) that is opened; impossible to create an Ogre view inside a Form, and a fortiori in a Control.
Is there somewhere a little simple sample that shows how to do this?
regards
Last edited by pas059 on Thu Jul 16, 2020 6:17 pm, edited 1 time in total.
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1075
- Contact:
-
- Gnoblar
- Posts: 2
- Joined: Wed Jul 15, 2020 2:20 pm
Re: ogre Windows.Form Control
Hello,
thank you for the sample.
started from it, i can now create an OgreControl (class derived from UserControl) and put it in a form at the location and size i want.
But now i have 2 problems:
regards
thank you for the sample.
started from it, i can now create an OgreControl (class derived from UserControl) and put it in a form at the location and size i want.
But now i have 2 problems:
- 1: the mouve actions have no effect. Despite the fact that i create a Listener and transmit the Control mouve events to it, this has no effect
- 2: i tried to create 2 UserControl that incorporate Ogre, but i remarked that there can be only one instance of ApplicationContextBase
regards