开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜