Time for action — creating a blank sheet

  1. First we need to include ExampleApplication:
    #include "Ogre\ExampleApplication.h"
    
  2. Create a new application class that inherits from ExampleApplication and has an empty createScene() function:
    class Example41 : public ExampleApplication
    {
    public:
    void createScene()
    {
    }
    };
    
  3. Lastly, we need a main function that creates an instance of the application class and runs it:
    int main (void)
    {
    Example41 app;
    app.go();
    return 0;
    }
    
  4. Compile this project with the same include and libraries directories as we did previously, and link the same libraries. You should get a black window which can be closed by pressing Escape.

What just happened?

We created a new application which inherits from ExampleApplication and does nothing. ...

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.