impr: Make text look super pretty on macOS finally

This commit is contained in:
WerWolv
2024-12-28 20:42:05 +01:00
parent 1605904eb1
commit bf6f738d2e
2 changed files with 12 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ namespace hex {
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_FALSE);
glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_TRUE);
glfwWindowHint(GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_TRUE);
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
}
@@ -96,6 +96,9 @@ namespace hex {
auto win = static_cast<Window *>(glfwGetWindowUserPointer(window));
win->fullFrame();
});
// Done to get super crisp font rendering together with GLFW_COCOA_RETINA_FRAMEBUFFER
ImGui::GetIO().FontGlobalScale = 1.0F / getBackingScaleFactor();
}
void Window::beginNativeWindowFrame() {