在全屏Win32 OpenGL中处理最小化 [英] Handling minimisation in Fullscreen Win32 OpenGL

查看:131
本文介绍了在全屏Win32 OpenGL中处理最小化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Win32和OpenGL创建一个全屏应用程序。我使用 EnumDisplaySettings ChangeDisplaySettings 更改分辨率,OpenGL函数工作正常。在它的WndProc我处理WM_ACTIVATEAPP和检测时,用户切换焦点到另一个窗口,然后我最小化应用程序的窗口。当窗口再次最大化时,窗口根本不会正常显示。

I'm trying to create a fullscreen application using Win32 and OpenGL. I change the resolution using EnumDisplaySettings and ChangeDisplaySettings and the OpenGL functions work fine. On its WndProc I handle WM_ACTIVATEAPP and detect when the user switched focus to another window, then I minimize the application's window. When the window is maximized again, the window doesn't display properly at all. What could I include to make the application work even after minimizing?

推荐答案

从问题中我还是不能说你缺少什么,你已经有了。请参阅 http://nehe.gamedev.net/ 。有一个部分Opengl基本代码,以全屏设置窗口并切换回窗口模式。看看你能不能从那里得到一些东西。

From the question I cannot still say what you are missing and what you already have. Refer to the http://nehe.gamedev.net/. There is a section Opengl base code to setup a window in full screen and switch back to window mode. See if you can get something from there.

这篇关于在全屏Win32 OpenGL中处理最小化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆