mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -05:00
impr: Allow ImHex to be used without subpixel rendering on Windows if only OpenGL 3 is available
This commit is contained in:
@@ -71,6 +71,13 @@ namespace hex::init {
|
||||
|
||||
ImHexApi::System::impl::setGPUVendor(glVendor);
|
||||
ImHexApi::System::impl::setGLRenderer(glRenderer);
|
||||
|
||||
{
|
||||
int glVersionMajor = 0, glVersionMinor = 0;
|
||||
glGetIntegerv(GL_MAJOR_VERSION, &glVersionMajor);
|
||||
glGetIntegerv(GL_MINOR_VERSION, &glVersionMinor);
|
||||
ImHexApi::System::impl::setGLVersion(SemanticVersion(glVersionMajor, glVersionMinor, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -397,8 +397,13 @@ namespace hex {
|
||||
}
|
||||
|
||||
void Window::configureGLFW() {
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
|
||||
if (ImHexApi::System::getGLVersion() >= SemanticVersion(4,1,0)) {
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
|
||||
} else {
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
|
||||
}
|
||||
glfwWindowHint(GLFW_DECORATED, ImHexApi::System::isBorderlessWindowModeEnabled() ? GL_FALSE : GL_TRUE);
|
||||
|
||||
// Windows versions before Windows 10 have issues with transparent framebuffers
|
||||
|
||||
Reference in New Issue
Block a user