Skip to main content

History: Intermediate Tutorial Introduction

Source of version: 39

Copy to clipboard
            !Intermediate Tutorial Introduction
For the intermediate tutorial series we will be leaving behind the BaseApplication framework. Now that we have a basic understanding of Ogre, we want to be able to manipulate many of the working pieces in our application. To make this simpler, we will now use a single header and cpp file. They contain a slightly simplified version of the tutorial framework.

You should __not__ organize your projects like this when you begin making your own Ogre applications. Having everything in one enormous class is terrible object-oriented programming. This is just for the purpose of the tutorials.

((IntermediateTutorialBaseSource|Here)) is the base code you should start each tutorial with. It might look overwhelming, but that is just because we were hiding some things in BaseApplication before. It's all of the same methods doing the same work as the framework (minus the overlay system, we will use CEGUI). As long as you stay focused on just the new parts we add, then you should slowly start to get familiar with pretty much everything in these two files by the end of the series. Each tutorial will include a screenshot in the introduction to demonstrate the finished result.

If you're interested in building these tutorials with cmake, then you can use this ((IntermediateTutorialCMakeList|CMakeLists.txt)).

You will also need to make sure you have this {MONO()}test.layout{MONO} file loaded with the resources for your project:
{CODE(caption="test.layout", wrap="1", colors="xml")}
<?xml version="1.0" ?>
<GUILayout version="4">
  <Window type="DefaultWindow" name="root">
    <Window type="TaharezLook/Label" name="TerrainLabel">
      <Property name="Position" value="{{0, 2}, {0, 2}}" />
      <Property name="Size" value="{{0.3, 0}, {0.1, 0}}" />
      <Property name="Text" value="Intermediate Tutorials" />
    </Window>
  </Window>
</GUILayout>
{CODE}
The use of layouts with CEGUI is covered in ((Basic Tutorial 7)).You can create a 'layouts' directory in your media folder, then add that directory to your resources.cfg file:
{CODE(caption="resources.cfg", wrap="1", colors="ini")}
...
[Layouts]
FileSystem=../media/layouts
FileSystem=/usr/local/share/cegui-0/layouts
{CODE}
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
((Intermediate Tutorial 1))
        

History

Information Version
Tue 31 of Mar, 2015 02:10 GMT-0000 kabbotta 42
Tue 31 of Mar, 2015 02:10 GMT-0000 kabbotta 41
Tue 31 of Mar, 2015 01:30 GMT-0000 kabbotta 40
Mon 30 of Mar, 2015 10:28 GMT-0000 kabbotta 39
Mon 30 of Mar, 2015 10:26 GMT-0000 kabbotta 38
Mon 30 of Mar, 2015 10:26 GMT-0000 kabbotta 37
Mon 30 of Mar, 2015 10:26 GMT-0000 kabbotta 36
Mon 30 of Mar, 2015 10:25 GMT-0000 kabbotta 35
Mon 30 of Mar, 2015 02:33 GMT-0000 kabbotta 34
Mon 30 of Mar, 2015 02:32 GMT-0000 kabbotta 33
Mon 30 of Mar, 2015 02:32 GMT-0000 kabbotta 32
Mon 30 of Mar, 2015 02:32 GMT-0000 kabbotta 31
Mon 30 of Mar, 2015 02:31 GMT-0000 kabbotta 30
Mon 30 of Mar, 2015 02:31 GMT-0000 kabbotta 29
Mon 30 of Mar, 2015 02:27 GMT-0000 kabbotta 28
Mon 30 of Mar, 2015 02:25 GMT-0000 kabbotta 27
Mon 30 of Mar, 2015 02:23 GMT-0000 kabbotta 26
Mon 30 of Mar, 2015 02:22 GMT-0000 kabbotta 25
Mon 30 of Mar, 2015 02:22 GMT-0000 kabbotta 24
Mon 30 of Mar, 2015 02:21 GMT-0000 kabbotta 23
Mon 30 of Mar, 2015 02:20 GMT-0000 kabbotta 22
Mon 30 of Mar, 2015 02:19 GMT-0000 kabbotta 21
Mon 30 of Mar, 2015 02:18 GMT-0000 kabbotta 20
Sun 29 of Mar, 2015 21:52 GMT-0000 kabbotta 19
Sun 29 of Mar, 2015 21:51 GMT-0000 kabbotta 18
  • «
  • 1 (current)
  • 2