Reputation: 1289
How can I determine if the OpenGL window is the active window?
Upvotes: 3
Views: 1590
Reputation: 162164
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)
Upvotes: 3
Reputation: 64223
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)
Upvotes: 5