Skip to main content

History: Mogre HOWTO's and Snippets

Preview of version: 10

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.

Geometry

Animation

2D content

Other

Tiny snippets

Anti Aliasing & Vsync

This has to be set as a param for the Render Window. Here an extended example from the Mogre Basic Tutorial 6:

Copy to clipboard
// 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.


Alias: Mogre_HOWTO's_and_C#_Snippets

Alias: Mogre HOWTO's and C

History

Information Version
Sun 03 of May, 2020 08:53 GMT-0000 randomcode 20
Wed 23 of Nov, 2016 04:51 GMT-0000 randomcode 19
Wed 23 of Nov, 2016 04:51 GMT-0000 randomcode 18
Mon 22 of Aug, 2016 08:48 GMT-0000 randomcode 17
Sat 17 of Mar, 2012 16:02 GMT-0000 Tubulii Added colourvalue helper class 16
Tue 21 of Feb, 2012 20:15 GMT-0000 pyritie 15
Mon 16 of Jan, 2012 20:16 GMT-0000 Tubulii added Dof shader 14
Mon 24 of Oct, 2011 13:42 GMT-0000 pyritie 13
Mon 24 of Oct, 2011 13:41 GMT-0000 pyritie 12
Sun 06 of Mar, 2011 21:18 GMT-0000 Beauty corrected link to the API + added link to ((RenderWindowParameters)) 11
Thu 19 of Aug, 2010 02:45 GMT-0000 Beauty added not + link for the page "WarehouseJims MOGRE HOWTO" 10
Thu 14 of Jan, 2010 13:56 GMT-0000 Beauty added FSAA note (quoted sinbad) ... in future we can move this subject to a seperate page ..... fuck, the quote style is realy ugly - I would like to have e.g. indentation and a different background c 9
Wed 30 of Dec, 2009 07:36 GMT-0000 jacmoe 8
Wed 30 of Dec, 2009 07:24 GMT-0000 jacmoe 7
Sat 19 of Dec, 2009 12:03 GMT-0000 jacmoe 6
Sat 19 of Dec, 2009 12:02 GMT-0000 jacmoe 5
Sat 19 of Dec, 2009 12:02 GMT-0000 jacmoe 4
Sat 19 of Dec, 2009 12:01 GMT-0000 jacmoe 3
Sat 19 of Dec, 2009 11:58 GMT-0000 jacmoe 2
Wed 09 of Dec, 2009 15:57 GMT-0000 Beauty 1