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: Tutorial 6
View page
Source of version: 5
(current)
!!Broken Rules and the sky is Falling Everybody has their own rules for coding in a standard format. I unfortunately broke one of my own cardinal rules. I never put two classes in the same file. So while creating a new Tutorial6 I put the TutorialFrameListener into its own file. Follow the steps from the previous tutorials and create a new Tutorial Project, but instead, put TutorialFrameListener into its own file as I did. You should now have a new Tutorial project called Tutorial6. This project should contain the following files. __Sources__ *TutorialFrameListener.cpp *TutorialApplication.cpp *WinMain.cpp __Headers__ *TutorialFrameListener.h *TutorialApplication.h Ok, new project, new tutorial, now what? Well you may think we are creating a space scene as one of the other tutorials available shows. To be honest, we were, at least until I remembered that existing tutorial. So we are going to do something different. On wards and upwards, but not too far up for the sky is falling. Remember that cool looking skybox? Did you know Ogre Scene Managers also supports skyplanes and skydomes? We will do something creative in this part of the tutorial: changing the skybox to a skydome. Find the following piece of code in your -+TutorialApplication::createScene()+- method. {CODE(wrap="1", colors="c++")}// Create the SkyBox mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox");{CODE} Now delete that code and enter the following: {CODE(wrap="1", colors="c++")}// Create the SkyDome mSceneMgr->setSkyDome(true, "Examples/CloudySky", 5, 8);{CODE} While we are here, move the -+setAmbientLight()+- from the bottom of the method to the top. This is just so that the coding style looks good. But what is the setSkyDome doing? The value of -+true+- tells the SceneManger that the sky dome is enabled. -+Examples/CloudySky+- is again, another material definition that already exists in the media directory. Now 5 and 8 are interesting. 5 is the sky curvature and 8 is the tiling of the texture in the sky. A more detailed description of the -+setSkyDome()+- can be found in -+Ogrenew\OgreMain\include\OgreSceneManager.h+- Now compile and see what we have created. {img fileId="1629" thumb="y" alt="xorekis6_1.jpg" rel="box[g]"} Ohh, that looks good. But it is still missing something. Let’s keep adding stuff shall we? So on to ((Tutorial 7))
Search by Tags
Search Wiki by Freetags
Latest Changes
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
Critter AI
Mogre Add-ons
MOGRE
Mogre MyGUI wrapper
...more
Search
Find
Advanced
Search Help
Online Users
66 online users