Mogre HOWTO's and Snippets        

This is a cookbook of code recipies for implementing a wide variety of tasks on Mogre with C#. The mini articles below on this page are for articles of a significant size. See The Big HOWTO and The Big HOWTO (II) for a large collection of miscellaneous, smaller samples with Ogre C++.

The WarehouseJims MOGRE HOWTO page contains also a lot of information.




2D content





Tiny snippets

Anti Aliasing & Vsync

This has to be set as a param for the Render Window. Here an extended example from the Mogre Tutorial - Embedding Mogre in Windows.Forms:

// Create Render Window
mRoot.Initialise(false, "Main Ogre Window");
NameValuePairList misc = new NameValuePairList();
misc["externalWindowHandle"] = Handle.ToString();
misc["FSAA"] = "4";        // anti aliasing factor (0, 2, 4 ...)
misc["vsync"] = "true";    // by Ogre default: false
mWindow = mRoot.CreateRenderWindow("Main RenderWindow", 800, 600, false, misc);

By default anti aliasing (FSAA) is disabled (0). Use an even factor (2, 4, ...) to enable it. The same way, you can enable Vsync.

Sinbad wrote:
VSync and FSAA are window-specific options, setConfigOption just contains them to deal with the auto-window. See Root::createRenderWindow for how to specify them in the NamedValuePairList.

FSAA and VSync cannot be changed without recreating the window, both fundamentally change the buffer structure on some render systems (either the count or format of them). You don't need to reinitialise the whoe render system, just recreate the window. Since the first window is 'special' in that it holds all the GPU driver resources, if you want to do this at runtime you should create a 1x1 background window first, then create a second window afterwards which can be destroyed and recreated to your hearts content.

For details look at this Ogre API page(external link).
More options you find on the page RenderWindowParameters.

Alias: Mogre_HOWTO's_and_C#_Snippets

Alias: Mogre HOWTO's and C

Contributors to this page: randomcode1 points  , Tubulii760 points  , pyritie597 points  , jacmoe180265 points  and Beauty14565 points  .
Page last modified on Wednesday 23 of November, 2016 04:51:36 UTC by randomcode1 points .

The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.