Skip to main content

History: Mogre HOWTO's and Snippets

Source of version: 18

Copy to clipboard
            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 __((OogstsHowTo|The Big HOWTO))__ and __((OogstsHowTo2|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.

{maketoc showhide="y"}

!!Geometry
* ((MOGRE GeneratingAMesh|Generating a Mesh)) - Example of creating a ((-Mesh|mesh)) in memory using a index and vertex buffer
* ((MOGRE OSMSceneLoader|OSM Scene Loader)) - Class for loading oFusion's OSM scene file
* ((MOGRE OSMSceneLoader 2|A recent OSM Scene Loader)) - A recent port of the class for loading oFusion's OSM scene file
* ((MOGRE dotSceneLoader)) - A ((dotScene)) format loader for Mogre
* ((MOGRE Line 3D)) - Create a line in 3D space
* ((Create Tetrahedron with MOGRE))
* ((ManualObject)) - Create objects by code
* ((MOGRE GeneratingAGrid|Generating a 3d Grid)) - Example code on how to generate a 3D grid on the xz plane
* ((MOGRE ManualSphereMeshes))
* ((MOGRE Projecting 3D position to 2D))
* ((MOGRE InstancedGeometry))
!!Animation
* ((MOGRE AnimationBlender|AnimationBlender)) - A class implemented to blend between two animations

!!2D content
* ((MogreBetaGUI)) - A simple ((-GUI)) system
* ((MQuickGUI)) - An other -GUI system
* ((MOGRE LoadingBarExample|Mogre Loading Bar Example)) - An example Mogre Loading Bar class
* ((Easy Debug Text for MOGRE))

!!Shaders
* ((Dof shader in Mogre)) - Depth of field shader for Mogre
* ((MOGRE Simple SSAO))
!!Other
* ((MOIS)) - Get current status of mouse and keyboard (or other devices)
* ((MOGRE MousePickingExample|Mogre Mouse Picking Example)) - An example for mouse picking of objects
* ((Raycasting to the polygon level - Mogre|Raycasting to the polygon level)) - This is a Mogre version of ((-Raycasting)) to the ((-Polygon|polygon)) level
* ((MOGRE LensFlare)) - ((LensFlare)) effect port for Mogre
* ((Catch LogMessages in MOGRE))
* ((Ray query with MOGRE))
* ((Convert a System.Image to a Mogre.Image|Convert a System.Drawing.Image to a Mogre.Image))
* ((Mogre Colourvalue helper class|Mogre Colourvalue helper class))
* ((Advanced Mogre Framework|Advanced Mogre Framework))
* ((AMOFGameEngine|AMOFGameEngine))

!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)):
{CODE(colors="c#")}// 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);{CODE}
By default anti aliasing (FSAA) is disabled (0). Use an even factor (2, 4, ...) to enable it. The same way, you can enable Vsync.


{QUOTE(replyto="Sinbad")}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.{QUOTE}

For details look at this [http://www.ogre3d.org/docs/api/html/classOgre_1_1Root.html#a537b7d1d0937f799cfe4936f6b672620|Ogre API page].
More options you find on the page ((RenderWindowParameters)).

---
Alias: (alias(Mogre_HOWTO's_and_C#_Snippets))

Alias: (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