leep
27-08-2006 14:34:38
I'm making a UserControl that will serve as the rendering window for Ogre and provide a interface specific to my application to the form it's placed on. In the UserControl's Resize event I'm just calling the camera's SetAspectRatio to set it to the ratio of the UserControl's new size. When the UserControl is resized at runtime, Ogre continues to draw on the entire resized surface and the aspect ratio remains correct.
My question is... what is RenderWindow.Resize(x,y) for? At first RenderWindow.x and .y match my UserControl's size. But as the UserControl is resized and Ogre seems to "resize" along with it, RenderWindow.x and .y don't change from their initial values. If I call RenderWindow(x, y) to change it, RenderWindow.x and .y STILL don't change. They seem to ignore the call to Resize. Am I doing something wrong, or is RenderWindow.Resize just not needed when you're rending to a window/control? Or is Ogre always rendering to my UserControl's initial size and just scaling the rendered image down to match the UserControl's current size? I did notice that even if I resize the UserControl down very small, the rendering doesn't get any faster.
-----
Lee
My question is... what is RenderWindow.Resize(x,y) for? At first RenderWindow.x and .y match my UserControl's size. But as the UserControl is resized and Ogre seems to "resize" along with it, RenderWindow.x and .y don't change from their initial values. If I call RenderWindow(x, y) to change it, RenderWindow.x and .y STILL don't change. They seem to ignore the call to Resize. Am I doing something wrong, or is RenderWindow.Resize just not needed when you're rending to a window/control? Or is Ogre always rendering to my UserControl's initial size and just scaling the rendered image down to match the UserControl's current size? I did notice that even if I resize the UserControl down very small, the rendering doesn't get any faster.
-----
Lee