Fixed Mac OSX Bugs

This commit is contained in:
2023-07-23 15:02:44 -07:00
parent a94b16e23f
commit a062b5a376
5 changed files with 14 additions and 14 deletions

View File

@ -31,7 +31,7 @@ int32_t DawnHost::init(DawnGame *game) {
glfwSetErrorCallback(&glfwOnError);
// Setup window hints
// Setup window hints
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, false);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
@ -56,10 +56,11 @@ int32_t DawnHost::init(DawnGame *game) {
assertNoGLError();
// Override the defaults
game->renderManager.backBuffer.setSize(
DAWN_GLFW_WINDOW_WIDTH_DEFAULT,
DAWN_GLFW_WINDOW_HEIGHT_DEFAULT
);
int32_t fbWidth, fbHeight;
glfwGetFramebufferSize(this->data->window, &fbWidth, &fbHeight);
assertTrue(fbWidth > 0, "Detected framebuffer width is too small?");
assertTrue(fbWidth > 0, "Detected framebuffer height is too small?");
game->renderManager.backBuffer.setSize(fbWidth, fbHeight);
assertNoGLError();
// Default keybinds