Changeset c559904 in opengl-game
- Timestamp:
- Sep 14, 2019, 12:58:30 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 09e15a4
- Parents:
- 2e77b3f
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
opengl-game.cpp
r2e77b3f rc559904 4 4 5 5 #include "consts.hpp" 6 #include "logger.hpp" 6 7 7 8 using namespace std; … … 24 25 cout << "OpenGL Game" << endl; 25 26 27 // TODO: Refactor the logger api to be more flexible, 28 // esp. since gl_log() and gl_log_err() have issues printing anything besides stirngs 29 restart_gl_log(); 30 gl_log("starting GLFW\n%s", glfwGetVersionString()); 31 32 open_log(); 33 get_log() << "starting GLFW" << endl; 34 get_log() << glfwGetVersionString() << endl; 35 26 36 if (initWindow(width, height, guiFlags) == RTWO_ERROR) { 27 37 return; … … 31 41 mainLoop(); 32 42 cleanup(); 43 44 close_log(); 33 45 } 34 46 47 // TODO: Make some more initi functions, or call this initUI if the 48 // amount of things initialized here keeps growing 35 49 bool OpenGLGame::initWindow(int width, int height, unsigned char guiFlags) { 50 // TODO: Put all fonts, textures, and images in the assets folder 36 51 gui = new GameGui_GLFW(); 37 52 38 53 if (gui->init() == RTWO_ERROR) { 54 // TODO: Also print these sorts of errors to the log 39 55 cout << "UI library could not be initialized!" << endl; 40 56 cout << gui->getError() << endl; -
vulkan-game.cpp
r2e77b3f rc559904 4 4 5 5 #include "consts.hpp" 6 #include "logger.hpp" 6 7 7 8 using namespace std; … … 20 21 cout << "Vulkan Game" << endl; 21 22 23 // This gets the runtime version, use SDL_VERSION() for the comppile-time version 24 // TODO: Create a game-gui function to get the gui version and retrieve it that way 25 SDL_GetVersion(&sdlVersion); 26 27 // TODO: Refactor the logger api to be more flexible, 28 // esp. since gl_log() and gl_log_err() have issues printing anything besides stirngs 29 restart_gl_log(); 30 gl_log("starting SDL\n%s.%s.%s", 31 to_string(sdlVersion.major).c_str(), 32 to_string(sdlVersion.minor).c_str(), 33 to_string(sdlVersion.patch).c_str()); 34 35 open_log(); 36 get_log() << "starting SDL" << endl; 37 get_log() << 38 (int)sdlVersion.major << "." << 39 (int)sdlVersion.minor << "." << 40 (int)sdlVersion.patch << endl; 41 22 42 if (initWindow(width, height, guiFlags) == RTWO_ERROR) { 23 43 return; … … 34 54 mainLoop(); 35 55 cleanup(); 56 57 close_log(); 36 58 } 37 59 60 // TODO: Make some more initi functions, or call this initUI if the 61 // amount of things initialized here keeps growing 38 62 bool VulkanGame::initWindow(int width, int height, unsigned char guiFlags) { 63 // TODO: Put all fonts, textures, and images in the assets folder 39 64 gui = new GameGui_SDL(); 40 65 41 66 if (gui->init() == RTWO_ERROR) { 67 // TODO: Also print these sorts of errors to the log 42 68 cout << "UI library could not be initialized!" << endl; 43 69 cout << gui->getError() << endl; -
vulkan-game.hpp
r2e77b3f rc559904 19 19 private: 20 20 GameGui* gui; 21 22 SDL_version sdlVersion; 21 23 SDL_Window* window; 22 24
Note:
See TracChangeset
for help on using the changeset viewer.