Skip to main content
History: Mogre Basic Tutorial 3 Source
View published page
Source of version: 2
(current)
{CODE(wrap="1", colors="c#")} using System; using System.Collections.Generic; using System.Windows.Forms; using MogreFramework; using Mogre; namespace Tutorial03 { static class Program { [STAThread] static void Main() { try { MyOgreWindow win = new MyOgreWindow(); new SceneCreator(win); win.Go(); } catch (System.Runtime.InteropServices.SEHException) { if (OgreException.IsThrown) MessageBox.Show(OgreException.LastException.FullDescription, "An Ogre exception has occurred!"); else throw; } } } class MyOgreWindow : OgreWindow { protected override void CreateSceneManager() { SceneManager = Root.CreateSceneManager(SceneType.ST_EXTERIOR_CLOSE); } } class SceneCreator { public SceneCreator(OgreWindow win) { win.SceneCreating += new OgreWindow.SceneEventHandler(SceneCreating); } void SceneCreating(OgreWindow win) { win.SceneManager.SetWorldGeometry("terrain.cfg"); //win.SceneManager.SetSkyBox(true, "Examples/SpaceSkyBox"); //win.SceneManager.SetSkyBox(true, "Examples/SpaceSkyBox", 10); //win.SceneManager.SetSkyBox(true, "Examples/SpaceSkyBox", 5000, false); //win.SceneManager.SetSkyBox(true, "Examples/SpaceSkyBox", 100, true); //win.SceneManager.SetSkyDome(true, "Examples/CloudySky", 5, 8); //win.SceneManager.SetSkyDome(false, ""); Plane plane; plane.d = 1000; plane.normal = Vector3.NEGATIVE_UNIT_Y; //win.SceneManager.SetSkyPlane(true, plane, "Examples/SpaceSkyPlane", 1500, 75); //win.SceneManager.SetSkyPlane(true, plane, "Examples/SpaceSkyPlane", 1500, 50, true, 1.5f, 150, 150); //win.SceneManager.SetSkyPlane(true, plane, "Examples/CloudySky", 1500, 40, true, 1.5f, 150, 150); //win.SceneManager.SetSkyPlane(false, new Plane(), ""); //ColourValue fadeColour = new ColourValue(0.9f, 0.9f, 0.9f); //win.Viewport.BackgroundColour = fadeColour; //win.SceneManager.SetFog(FogMode.FOG_LINEAR, fadeColour, 0, 50, 500); //win.SceneManager.SetFog(FogMode.FOG_EXP, fadeColour, 0.005f); //win.SceneManager.SetFog(FogMode.FOG_EXP, fadeColour, 0.003f); } } } {CODE}
Search by Tags
Search Wiki by Freetags
Latest Changes
Projects using OGRE
Building Your Projects With CMake
Compiled API Reference
Overlay Editor
Introduction - JaJDoo Shader Guide - Basics
RT Shader System
RapidXML Dotscene Loader
One Function Ogre
One Function Ogre
...more
Search
Find
Online Users
172 online users
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