OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: Mogre HOWTO's and Snippets
View page
Source of version: 20
(current)
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)) * ((Advanced Mogre Framework)) * ((OpenMB)) !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))
Search by Tags
Search Wiki by Freetags
Latest Changes
One Function Ogre
IDE Eclipse
FMOD SoundManager
HDRlib
Building Ogre V2 with CMake
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
...more
Search
Find
Advanced
Search Help
Online Users
199 online users