lickstab
04-02-2009 12:19:29
hello, i've created a subclassed panel control which renders mogre inside of it.
the rendering, using the engine and all that works fine, but i have one problem.
the resolution of the window is only 200x100, so it's obviously very stretched and blurry..
i can't figure out how to set the resolution.
first i did what the mogre form samples does:
root.RenderSystem.SetConfigOption("Video Mode", "800 x 600 @ 32-bit colour");
as part of creating the mogre window.. but it would still create it at 200x100 (as the ogre.log reports.)
then i tried telling CreateRenderWindow my resolution directly (which the sample doesn't do):
window = root.CreateRenderWindow("MogreBox Window", 640, 480, false, misc.ReadOnlyInstance);
no difference.
another problem i have is that i'm doing this:
root.RenderSystem.SetConfigOption("VSync", "Yes");
but ogre.log still reports that vsync is disabled and gives me a warning about it.
here's what the log file says about these things:
12:51:37: D3D9 : RenderSystem Option: VSync = Yes
// ..cpu identifier/features part here
12:51:37: D3D9RenderSystem::createRenderWindow "MogreBox Window", 640x480 windowed miscParams: externalWindowHandle=527810
12:51:37: D3D9 : Created D3D9 Rendering Window 'MogreBox Window' : 200x100, 32bpp
12:51:37: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
where is it getting 200x100 from? it's not the size of the panel itself, it's much larger than that.
i'm using the mogre 1.4.8 sdk.
the rendering, using the engine and all that works fine, but i have one problem.
the resolution of the window is only 200x100, so it's obviously very stretched and blurry..
i can't figure out how to set the resolution.
first i did what the mogre form samples does:
root.RenderSystem.SetConfigOption("Video Mode", "800 x 600 @ 32-bit colour");
as part of creating the mogre window.. but it would still create it at 200x100 (as the ogre.log reports.)
then i tried telling CreateRenderWindow my resolution directly (which the sample doesn't do):
window = root.CreateRenderWindow("MogreBox Window", 640, 480, false, misc.ReadOnlyInstance);
no difference.
another problem i have is that i'm doing this:
root.RenderSystem.SetConfigOption("VSync", "Yes");
but ogre.log still reports that vsync is disabled and gives me a warning about it.
here's what the log file says about these things:
12:51:37: D3D9 : RenderSystem Option: VSync = Yes
// ..cpu identifier/features part here
12:51:37: D3D9RenderSystem::createRenderWindow "MogreBox Window", 640x480 windowed miscParams: externalWindowHandle=527810
12:51:37: D3D9 : Created D3D9 Rendering Window 'MogreBox Window' : 200x100, 32bpp
12:51:37: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
where is it getting 200x100 from? it's not the size of the panel itself, it's much larger than that.
i'm using the mogre 1.4.8 sdk.