GameEngine.h 597 B

12345678910111213141516171819202122
  1. #ifndef GAMEENGINE_H
  2. #define GAMEENGINE_H
  3. #include <GL/glew.h>
  4. #include <GLFW/glfw3.h>
  5. #include <stdio.h>
  6. #include <stdlib.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,
  15. WindowResize windowResize, MouseMove move);
  16. GLuint getProgram();
  17. #endif