I have a windows form, with a docked (fill mode) Picturebox on it. Initially creating the Irrlicht device works fine. Upon resize of the form the background color of the Scene's background color scales along nicely. but the scene itself stays in the same size and gets outline in the left bottom. These are the properties I set for the Device.
protected IEngine(ref PictureBox container)
{
_container = container;
_device = new IrrlichtDevice(DriverType.OPENGL, new Dimension2D(container.Width, container.Height), 32, false, true, true, true, container.Handle);
_device.ResizeAble = true;
_meshManager = new MeshManager();
_sceneNodeManager = new SceneNodeManager();
_textureManager = new TextureManager();
_animatedMeshManager = new AnimatedMeshManager();
}
Any Ideas?
PictureBox Docked (Fill), Doesn't Resize properly.
-
- Posts: 30
- Joined: Wed Mar 15, 2006 7:42 pm
- Location: http://cube3.helpmy.net
I have the same
I am encountering the similiar problem and I can't find an answer anywhere. The description of what looks like happening is that the viewport for rendering isn't resizing but it's still updating correctly.
-
- Posts: 30
- Joined: Wed Mar 15, 2006 7:42 pm
- Location: http://cube3.helpmy.net
Will recreating the camera also solve the resolution? The resolution seems to stay fixed on the initial .NET Panel control size. Tried to reasign the scene to another viewport passing the new Panel's dimensions but doesn't fix the resolution issue.
Platform 3D Engine using Irrlicht.NET
http://cube3.helpmy.net
http://cube3.helpmy.net
No, for that the device has to be created again. You can also try to set the control size manually to the desiredd resolution and after that create the device. E.g.
The .NET layout engine will change the control size again if the control is anchored or docked so that way the size change doesn't affect the end result. This is not working in every place because it depends how much the control size can be changed. E.g. if the window size is only 600 * 600, and you have "irrlicht" panel inside the window, the max size is 600*600.
Code: Select all
this.Widht = 1024;
this.Height = 768;
Initialize(this.Handle);