glfw获取显示器的宽度/高度

问题描述 投票:0回答:1

我是OpenGL的新手,尤其是glfw,想知道是否有可能检索首选监视器的宽度/高度(在C / C ++中吗?例如类似于:unsigned int width = glfwGetMonitorWidth(), height = glfwGetMonitorHeight();

c++ opengl window glfw
1个回答
1
投票

如果您需要以像素为单位的显示器尺寸-您必须在寻找glfwGetVideoMode

如果您需要物理监视器尺寸(以毫米为单位)-glfwGetMonitorPhysicalSize

© www.soinside.com 2019 - 2024. All rights reserved.