You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

game.h 942B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * =====================================================================================
  3. *
  4. * Filename: game.h
  5. *
  6. * Description: Main game class
  7. *
  8. * Version: 1.0
  9. * Created: 03/23/2014 06:29:19 PM
  10. * Revision: none
  11. * Compiler: gcc
  12. *
  13. * Author: YOUR NAME (),
  14. * Organization:
  15. *
  16. * =====================================================================================
  17. */
  18. #pragma once
  19. #include <GL/glew.h>
  20. #include <SDL2/SDL.h>
  21. #include <SDL2/SDL_opengl.h>
  22. #include "window.h"
  23. #include "config.h"
  24. namespace vtk {
  25. class Scene;
  26. class Game {
  27. public:
  28. Game();
  29. void init();
  30. void start();
  31. void loop();
  32. void stop();
  33. void setScene(Scene* scene);
  34. void setConfig(Config* conf);
  35. Config* getConfig();
  36. Window window;
  37. protected:
  38. Config* conf;
  39. Scene* activeScene;
  40. void cleanup();
  41. bool running;
  42. GLuint mColor, mDepth, mFBO;
  43. };
  44. }