Really don't understand why I get the compile error. I put a big arrow on the line this error appeared on. I've tried rearranging the order of the includes and stuff like that, but even if that worked I wouldn't understand why.
Code:
----MAIN.cpp----------------
#include <G3D/G3DAll.h>
#include <GLG3D/GLG3D.h>
#include "App.h"
#include "Demo.h"
int main(int argc, char** argv)
{
GAppSettings settings;
settings.window.width = 800;
settings.window.height = 600;
App app(settings);
app.setDebugMode(true);
app.debugController.setActive(true);
app.run();
return 0;
}
-----DEMO.h-------------------
#ifndef Demo_H
#define Demo_H
#include <G3D/G3DAll.h>
#include <GLG3D/GLG3D.h>
#include "App.h"
class Demo : GApplet { <<<<-----------------------------Here's the ERROR
public:
Demo(App* app) : app(app) {}
void doGraphics();
private:
const App* app;
};
#endif
------APP.h------------------
#ifndef App_H
#define App_H
#include <G3D/G3DAll.h>
#include <GLG3D/GLG3D.h>
#include "Demo.h"
class App : public GApp {
public:
App(const GApp::Settings& settings): GApp(settings) {}
void main();
};
#endif
-------APP.cpp---------------
#include "App.h"
void App::main()
{
Demo(this).run();
}
------DEMO.CPP-------------
#include "Demo.h"
void Demo::doGraphics() {
app->renderDevice->clear(true, true, true);
app->renderDevice->setProjectionAndCameraMatrix(app->debugCamera);
Draw::axes(Vector3(0,4,0),app->renderDevice);
}