Advertisement
Ramaraunt1

stellarEngine.h

May 11th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. #pragma once
  2. #define GLEW_STATIC
  3. #include <vector>
  4. #include "GL/glew.h"
  5. #include "GLFW/glfw3.h"
  6. #include "utilities.h"
  7.  
  8.  
  9. static class Engine
  10. {
  11. public:
  12. int Initialize(int framerate = 30, int screenWidth = 640, int screenHeight = 480, std::string titleBarText = "My OpenStellar Game", bool fullscreen = false, bool resizable = false, Color splashcolor = Color(1.0f, 0.0f, 0.0f, 1.0f), bool shouldDrawSplash = true, GLuint glClearMode = GL_COLOR_BUFFER_BIT, int openGLVersionMajor = 3, int openGLVersionMinor = 3, GLuint profile = GLFW_OPENGL_CORE_PROFILE, GLuint compatiblity = GL_TRUE, int intervalToSwap = 0);
  13. void Start();
  14. void Stop();
  15. void setPause(bool pause);
  16. bool getIfPaused();
  17. void changeSplashColor(float r, float g, float b, float a);
  18. void changeSplashColor(Color splashColor);
  19. Color getSplashColor();
  20. float getRed();
  21. float getGreen();
  22. float getBlue();
  23. float getAlpha();
  24. void setShouldDrawSplashColor(bool drawOrNot);
  25. bool getShouldDrawSplashColor();
  26. bool addRoom(RoomInfo room);
  27. bool removeRoom(std::string name);
  28. Room* getCurrentRoom();
  29. bool addTexture(TextureInfo texture);
  30. TextureInfo* getTexture(std::string textureName);
  31. void setRoomLoadingOnDemand(Demand getRoomsOnDemand);
  32. Demand getRoomLoadingOnDemand();
  33. void setTextureLoadingOnDemand(Demand setTexturesOnDemand);
  34. Demand getTextureLoadingOnDemand();
  35. void setFrameRate(int fps);
  36. int getFrameRate();
  37. bool readyForFrame;
  38. void setSwapInterval(int interval);
  39. int getSwapInterval();
  40. double getDeltaTime();
  41. private:
  42. bool GLFWinitialize();
  43. std::vector<Room> refreshRoomRunOrder();
  44. int screenWidth;
  45. int screenHeight;
  46. std::string screenTitle;
  47. GLFWmonitor* screenFullscreen;
  48. GLuint screenResizable;
  49. Color screenSplashColor;
  50. GLuint screenClearMode;
  51. bool screenSplashColorShouldDraw;
  52. int screenGLVersionMajor;
  53. int screenGLVersionMinor;
  54. GLuint screenProfile;
  55. GLuint screenCompatability;
  56. int fps;
  57. bool pause;
  58. std::vector<RoomInfo> rooms;
  59. std::vector<TextureInfo> textures;
  60. bool roomsOnDemand;
  61. bool texturesOnDemand;
  62. int swapInterval;
  63. GLFWwindow* window;
  64. double deltaTime;
  65. double lastFrame;
  66. int curFrame;
  67. Demand textureLoadingOnDemand;
  68. Demand roomLoadingOnDemand;
  69. bool gameHasStarted;
  70. bool engineIsInitialized = false;
  71. int textureIdIncrement;
  72. int roomIdIncrement;
  73. Room currentRoom;
  74. protected:
  75.  
  76. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement