RenderWindowParameters        

A new RenderWindow will be created by Root::createRenderWindow().

The properties of the window can be changed by a parameter list.

virtual RenderWindow* createRenderWindow(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams = 0) = 0;


The parameter miscParams can contain an optional list of name-value pairs describing the desired properties of the new RenderWindow.

Some important properties are:

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


More parameters:
Look to 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:

NameValuePairList misc;
misc["vsync"] = "1";
misc["FSAA"] = "4";
createRenderWindow("My render window", 800, 600, true, &misc);




See also