public:t-gede-13-1:lab1
This is an old revision of the document!
Table of Contents
LAB1: Ogre Startup Sequence
This lab is based on chapter 9 “The Ogre 3D Startup Sequence” from the book “Ogre 3D 1.7 - Beginner's Guide” by Felix Kerger, which will be given to you as a hand-out at the beginning of the lab class. But before you can start on the steps in the chapter, you will need to properly set up your development environment, this is covered below.
Preparation
If you are using your own computer, you need to:
- Download and install C++ development environment, the instructions will assume you are using the MS Visual C++ Express 2010 environment, which you can get for free. You're free to use other environments or platforms as long as you take care of making it work (with the help of the Internet).
- Download and install OGRE 1.8.1 SDK for Visual C++ .Net 2010 (32-bit). I recommend extracting this to a folder with a relatively short path and no spaces. E.g. into “C:\Development”.
To prepare your environment and project you need to:
- Create a system environment variable OGRE_HOME that points to Ogre SDK folder. You can then refer to this variable in your project setup as $(OGRE_HOME). This is so that you can easily take your project to a different machine where Ogre might be installed in a different folder. If each machine defines this variable, the project should be able to find the needed includes and libraries (see below).
- Add the SDK bin/debug and bin/release folders to your system “path” variable (for DLLs to be found)
- Create a new project called “Lab1” inside a new solution called “GEDE2013” (it is a good idea to let VC++ create a folder for your solution - use the check box - and then your projects will appear inside that folder). The project should be a WIN32 Console Application and completely empty. You will write it from scratch.
- Right-click on your project inside VC++ and choose properties. Add Ogre folders and files in several locations within the properties:
- C/C++→General→Additional Include Directories = $(OGRE_HOME)\include\OIS;$(OGRE_HOME)\include\OGRE;$(OGRE_HOME)\include;$(OGRE_HOME)\boost;%(AdditionalIncludeDirectories)
- Linker→Input→Additional Dependencies = OgreMain_d.lib;OIS_d.lib;%(AdditionalDependencies)
- Linker→General→Additional Library Directories = $(OGRE_HOME)\boost\lib;$(OGRE_HOME)\lib\debug;%(AdditionalLibraryDirectories)
- Copy plugins_d.cfg and resources_d.cfg from the SDK bin/debug folder into your own GEDE2013/debug (or wherever your own compiled executables will be placed)
Lab Project
Work through the enumerated actions in the hand-out given to you. What follows are some notes regarding those actions.
- “Starting Ogre 3D”
- “Loading the Sinbad mesh”
- “Using resources.cfg to load our models”
- “Creating a class”
- “Adding a FrameListener”
- “Adding input”
- “Using our own rendering loop”
- “Adding a frame listener - Camera”
- “Adding a plane and a light”
- “Controlling the model with the arrow keys” (OPTIONAL)
- “Adding animation” (OPTIONAL)
/var/www/cadia.ru.is/wiki/data/attic/public/t-gede-13-1/lab1.1358247193.txt.gz · Last modified: 2024/04/29 13:32 (external edit)