开发者

How can I determine if the OpenGL window is the active window?

开发者 https://www.devze.com 2023-02-22 12:12 出处:网络
How can I determine if the O开发者_StackOverflow社区penGL window is the active window?You can not do it from the opengl, because only the window manager knows which window is active. The best you can

How can I determine if the O开发者_StackOverflow社区penGL window is the active window?


You can not do it from the opengl, because only the window manager knows which window is active. The best you can do, is you activate it yourself (for example, in glut it is done with glutSetWindow)


OpenGL only deals with drawing stuff. Terms like "Window" "Active" or "Focused" are completely outside the scope of OpenGL. You need to consult your windowing system's functions for this (Win32, X11, or functions provided by a cross-plattform toolkit)

0

精彩评论

暂无评论...
验证码 换一张
取 消