Changeset a6f6833 in opengl-game for game-gui-glfw.cpp
- Timestamp:
- Sep 15, 2019, 5:27:13 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 92cbc6a
- Parents:
- 09e15a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-glfw.cpp
r09e15a4 ra6f6833 56 56 window = glfwCreateWindow(windowWidth, windowHeight, title.c_str(), mon, nullptr); 57 57 58 // TODO: I should check the window size after it's created to make sure it matches the requested size 59 // glfwGetFramebufferSize(window, width, height) segfaults on OSX, check other platforms 60 // I think glfwGetWindowSize(window, width, height) works fine. 61 58 62 glfwSetMouseButtonCallback(window, glfw_mouse_button_callback); 59 63 glfwSetKeyCallback(window, glfw_key_callback); … … 89 93 } 90 94 95 void GameGui_GLFW::refreshWindowSize() { 96 // glfwGetFramebufferSize(window, width, height) segfaults on OSX, check other platforms 97 // I think glfwGetWindowSize(window, width, height) works fine. 98 glfwGetWindowSize(window, &windowWidth, &windowHeight); 99 } 100 101 int GameGui_GLFW::getWindowWidth() { 102 return windowWidth; 103 } 104 105 int GameGui_GLFW::getWindowHeight() { 106 return windowHeight; 107 } 108 91 109 #ifdef GAMEGUI_INCLUDE_VULKAN 92 110 … … 95 113 RTWO_SUCCESS : RTWO_ERROR; 96 114 } 97 98 #endif99 115 100 116 vector<const char*> GameGui_GLFW::getRequiredExtensions() { … … 109 125 } 110 126 111 void GameGui_GLFW::getWindowSize(int* width, int* height) { 112 // This function segfaults on OSX, check other platforms 113 //glfwGetFramebufferSize(window, width, height); 114 115 *width = windowWidth; 116 *height = windowHeight; 117 } 127 #endif 118 128 119 129 void glfw_error_callback(int error, const char* description) {
Note:
See TracChangeset
for help on using the changeset viewer.