I am using WPF, is there any possibility of running 3D in a container (such as a grid, viewport3d) ?
Thnx
How to run Irrlicht in a panel
re:Running Irrlicht in Panel
Hi there,
You can run irrlicht inside a Panel. You have to do two things
1) Pass the Handle of your panel to createDevice (see the last overload which accepts the Intptr handle)
2) Alter the while main loop slightly. Currently in all the samples, its like this
When you have a panel control the windowactive flag is false because it is not the active window. To rectify this do this (assuming that your panel is named panel1)
And there you have it irrlicht working inside a panel.
Let me know if there is anything which needs explanation.
Regards,
Mobeen
You can run irrlicht inside a Panel. You have to do two things
1) Pass the Handle of your panel to createDevice (see the last overload which accepts the Intptr handle)
2) Alter the while main loop slightly. Currently in all the samples, its like this
Code: Select all
while(device.run())
{
if(device.windowActive)
{
//beginscene
//render ...
//end scene
}
}
Code: Select all
while(device.run())
{
if(panel1.Parent == Form.ActiveForm)
{
//beginscene
//render ...
//end scene
}
}
Let me know if there is anything which needs explanation.
Regards,
Mobeen
Proud to be a PAKISTANI
I would like to run a FPS scene inside a pictureBox. I have been able to get the map to display in the pictureBox and I can use the mouse to change the point of view but I can't move around the map with the arrow keys. Is it possible to use FPS scene in a pictureBox? If so how?
Also I would like the user to be able to use the mouse to click on buttons on the form so I have used the CursorControl.Visible property but the cursor does not move. Can this be done?
Any help is greatly appreciated.
Also I would like the user to be able to use the mouse to click on buttons on the form so I have used the CursorControl.Visible property but the cursor does not move. Can this be done?
Any help is greatly appreciated.
Re:
What language are you using c++ or c#.
If you are using c#, then make sure that the KeyPreview property of your form is set to true otherwise the key input will be set to the control having focus and the form key handler will not be called.
If you are using c++ then what windowing apui are u using MFC, wxWidgets or custom?
If you are using c#, then make sure that the KeyPreview property of your form is set to true otherwise the key input will be set to the control having focus and the form key handler will not be called.
If you are using c++ then what windowing apui are u using MFC, wxWidgets or custom?
Proud to be a PAKISTANI
RE:
Yeah I tried that too and it doesnot work even if u attach a custom eventreceiver. Only mouse movement is working ok. I feel that the .Net forms do not allow keyboard events to be passed to irrlicht. I will try to see this and let u know if i come up with anything.Darkness wrote:I am using C#. I have set the KeyPreview property to true but I am still unable to move around the map.
Proud to be a PAKISTANI