glfw创建全屏窗口


```cpp
int monitorCount=0;
	GLFWmonitor** pMonitor = glfwGetMonitors(&monitorCount);
	int holographic_screen = -1; 
	GLFWwindow* _window = NULL;
	int w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN);
	for (int i = 0; i<monitorCount; i++) 
	{
		GLFWvidmode* mode = (GLFWvidmode*)glfwGetVideoMode(pMonitor[i]);
		if (mode->width == w && h == mode->height) 
		{
			holographic_screen = i;
			_window = glfwCreateWindow(w, h, "", pMonitor[holographic_screen], NULL);
		}
	}

发布了8 篇原创文章 · 获赞 0 · 访问量 859
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览