History: RenderWindowParameters
Source of version: 2 (current)
Copy to clipboard
A new RenderWindow will be created by ''Root::createRenderWindow()''.
The properties of the window can be changed by a parameter list.
{CODE(wrap="1" colors="c++")}
virtual RenderWindow* createRenderWindow(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams = 0) = 0;
{CODE}
The parameter __miscParams__ can contain an optional list of name-value pairs describing the desired properties of the new RenderWindow.
Some important properties are:
{FANCYTABLE( head=" Key| Values | Default | Description")}
title | Any string | RenderTarget name | The title of the window that will appear in the title bar
colourDepth | 16 or 32 | desktop depth | Colour depth of the resulting rendering window; only applies if fullScreen is set.
left | positive integers | center on screen | Screen x coordinate from left; only applies if fullScreen is not set.
top | positive integers | center on screen | Screen y coordinate from top; only applies if fullScreen is not set.
depthBuffer | true, false | true | Use depth buffer
externalWindowHandle | API specific | None | External window handle, for embedding the OGRE context. For Windows, this is the HWND handle converted to an unsigned integer.
FSAA | 0,2,4,6,... | 0 | Full screen antialiasing factor
displayFrequency | 60..200 | Desktop frequency | Display frequency rate; only applies if fullScreen is set.
vsync | true, false | false | Synchronize buffer swaps to monitor vsync, eliminating tearing at the expense of a fixed frame rate
{FANCYTABLE}
__More parameters:__
Look to [http://www.ogre3d.org/docs/api/html/classOgre_1_1Root.html#a537b7d1d0937f799cfe4936f6b672620|this part] of the Ogre class reference.
Parameters that are not recognized by a certain render system or platform are silently ignored, unless stated otherwise.
!!Example
Create a full screen (800x600) render window with vertical synchronisation and 4x FSAA:
{CODE(wrap="1" colors="c++")}
NameValuePairList misc;
misc["vsync"] = "1";
misc["FSAA"] = "4";
createRenderWindow("My render window", 800, 600, true, &misc);
{CODE}
%%%
!!See also
* [http://www.ogre3d.org/docs/api/html/classOgre_1_1Root.html#a537b7d1d0937f799cfe4936f6b672620|Root::createRenderWindow()] - Details in Ogre class reference
* ((Video Setting Manager)) - Stores and retrieves saved video settings