C#, rendering in tabpages (TabControl)
C#, rendering in tabpages (TabControl)
Hello, I'm working on a rather large project that I will not go into details as it's not ready to be announced yet.
Anyhow, I'm using the TabControl for the level editor and I need to be able to render to each TabPage. When the user clicks "Tab1", I want the rendering device to switch to "Tab1". If the user clicks "Tab2", I want the rendering device to switch over to "Tab2" and forget about "Tab1"... and so on.
Can this be done?
Thank you!
Anyhow, I'm using the TabControl for the level editor and I need to be able to render to each TabPage. When the user clicks "Tab1", I want the rendering device to switch to "Tab1". If the user clicks "Tab2", I want the rendering device to switch over to "Tab2" and forget about "Tab1"... and so on.
Can this be done?
Thank you!
a completely worthless answer there rooly, thanks for that.
to render 3d to a tab- just add a gui image with a render target as the texture, and use getActiveTab to decide which one you are drawing to.
since only one image will be visible at once, you might as well add the same texture to each tab and just change the current camera or scene manager in your render loop. see the meshviewer (for tabs) and render to texture tutorials for details.
to render 3d to a tab- just add a gui image with a render target as the texture, and use getActiveTab to decide which one you are drawing to.
since only one image will be visible at once, you might as well add the same texture to each tab and just change the current camera or scene manager in your render loop. see the meshviewer (for tabs) and render to texture tutorials for details.
Isn't he talking about Windows Forms' Tabs ? I mean, including Irrlicht in a Windows Forms tab control
If so, I'd say it could be done by adding a picture box for both tabs (because Irrlicht can only handle one control at the same time) and handle in events where the user switched the tabs
Or you can create two devices and switch the first to pause when the user uses the second tab...
Anyway, please give more details
If so, I'd say it could be done by adding a picture box for both tabs (because Irrlicht can only handle one control at the same time) and handle in events where the user switched the tabs
Or you can create two devices and switch the first to pause when the user uses the second tab...
Anyway, please give more details
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
Sorry- I'm talking about Windows Forms.
It's for a level editor, so if you open multiple levels it'll open in a new tab (the game is 2d/isometric that's why).
All I need to know is how to change the rendering source which is defined here (RendowWindow is the control rending to):
All I need to know is how to change that last option dynamically (the handle of the RenderWindow).
By the way, I've been using Irrlicht for one day so far.
Thanks!
It's for a level editor, so if you open multiple levels it'll open in a new tab (the game is 2d/isometric that's why).
All I need to know is how to change the rendering source which is defined here (RendowWindow is the control rending to):
Code: Select all
Device = new IrrlichtDevice(DriverType.DIRECT3D9,
new Dimension2D(640, 418), 32, false, false,
false, false, RenderWindow.Handle);
By the way, I've been using Irrlicht for one day so far.
Thanks!
Impossible (unless I'm wrong).MacK wrote:All I need to know is how to change that last option dynamically (the handle of the RenderWindow).Code: Select all
Device = new IrrlichtDevice(DriverType.DIRECT3D9, new Dimension2D(640, 418), 32, false, false, false, false, RenderWindow.Handle);
The only solution is to create a new device for each tab and to use it only when the tab is focused.
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
Well I need it so the user can open multiple windows at once. I might just go ahead and use the Irrlicht GUI system instead... I was messing with it and it felt pretty good...bitplane wrote:I'm just guessing here, but can't you just put it inside another windows control and move that around instead.
I don't think you can create more than one device at present.
-
- Posts: 2
- Joined: Mon Mar 20, 2006 9:25 pm