glutGetWindow man page

glutGetWindow — Return the current window identifier, 0 if undefined

Library

OpenGLUT - window

Synopsis

#include <openglut.h>

int
glutGetWindow(void);

Description

glutGetWindow() returns the


window id


of the


current window


. This is useful, e.g., if you have a generic function that is used with several windows and it needs to temporarily change to another window. (There is no window stack for you to use with pushes and pops. Do not be confused by glutPushWindow() and glutPopWindow(); those pushes and pops are


not


stack-related!)

One cause for the function to return 0 is if you have called glutDestroyWindow() on the


current window


and have done nothing to set a new window as current.

See Also

glutSetWindow(3)

 

Referenced By

glutSetWindow(3).