GameEngine.h 590 B

12345678910111213141516171819202122
  1. #ifndef GAMEENGINE_H
  2. #define GAMEENGINE_H
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <GL/glew.h>
  6. #include <GLFW/glfw3.h>
  7. static const long NANOS_PER_TICK = 50000000;
  8. static const int MAX_TICKS_PER_FRAME = 5;
  9. typedef void (*InitFunction) (int);
  10. typedef void (*TickFunction) (int);
  11. typedef void (*RenderTickFunction) (int, float);
  12. typedef void (*WindowResize) (int, int);
  13. typedef void (*MouseMove) (float, float);
  14. int startGame(char* name, InitFunction init, TickFunction tick, RenderTickFunction renderTick, WindowResize windowResize, MouseMove move);
  15. GLuint getProgram();
  16. #endif