History: Basic Tutorial Introduction
Source of version: 14
Copy to clipboard
{TRANSCLUDE(page="tutbox")}This is where you should start if you are completely new to Ogre. All you need is an understanding of writing and compiling c++ programs. For this tutorial series, we will use a pre-built code base that is referred to as the ((Ogre Wiki Tutorial Framework)). This will allow us to jump right into a full scene. Don't be overwhelmed by all of the code that already exists, just focus on the topic at hand. We will slowly introduce everything step by step.
It is important that you add code as you read. The full source will be provided so that you can check your work, but you should write up every tutorial before checking it against the completed source.
{TRANSCLUDE}
!Setup
Before you can begin this series, you have to set up a basic Ogre project. If you need help with this, then you can read ((Setting Up An Application)). It has setup information for each OS and a section about building with cmake. It also has a section that covers the framework we will be using.
To start this series, you'll need four files that you can find ((Ogre Wiki Tutorial Framework|here)). Copy these files into your project (make sure to get the files for you version of Ogre) with the right line endings for your OS):
{CODE(wrap="1" colors="c++")}
BaseApplication.h
BaseApplication.cpp
TutorialApplication.h
TutorialApplication.cpp
{CODE}
Compile and run your application with these new files included. You should see the overlay displaying information about the rendering statistics. If you've got this far, then you're ready to start the series.
!Notes
When the tutorial shifts to a new method it will always be mentioned explicitly. For example, you will see: "Add the following to the beginning of {MONO()}createScene{MONO}:" If a new code section is reached and nothing has been mentioned, then you can assume the code continues exactly where the last section left off. If you spot any cases where this isn't true, then please leave a comment or make the change yourself.
During these tutorials, when a block of code (i.e. something between brackets { }) is broken up over more than one code section, a ^ will be used as a reminder that the code is continuing an unfinished block. This should __not__ be included in your project. It is soley for formatting.
An example:
{CODE(wrap="1" colors="c++")}
if (skyIsBlue)
{
sunshineOnMyFace = true;
{CODE}
Later...
{CODE(wrap="1" colors="c++")}
^ if (seeThunderCloud)
{
takeCover();
}
}
{CODE}
These should be read as one single if statement.
!Next
((Basic Tutorial 1))