1UNTITLED                             LOCAL                            UNTITLED
2

NAME

4     glutSetWindow — Select the <i>current window</i>
5

LIBRARY

7     OpenGLUT - window
8

SYNOPSIS

10     #include <openglut.h>
11
12     void
13     glutSetWindow(int ID);
14

PARAMETERS

16      ID        Window identifier
17

DESCRIPTION

19     Sets the  current window   to  ID.
20
21     All OpenGL rendering goes to the  current window  .  Many OpenGLUT func‐
22     tions also implicitly use the  current window  .
23
24     Many OpenGLUT callback operations are tied to a window.  When your call‐
25     back is invoked, OpenGLUT will set that particular window to be the  cur‐
26     rent window  .  However, some callbacks---such as that registered via
27     glutIdleFunc()---do not have associated windows.  If a callback is not
28     associated to a particular window, then when OpenGLUT invokes that call‐
29     back you should  always   use glutSetWindow() to select the appropriate
30     window before doing any OpenGL rendering or doing any OpenGLUT window-
31     related operations.
32
33     There may be cases when you can get away with assuming that the  current
34     window   is unchanged since some prior time, but OpenGLUT has consider‐
35     able liberaty with respect to when it invokes your functions.  Also, your
36     program may add more windows or more operations on other windows as you
37     develop it.
38
39     Lastly, this is a convenient way to select among multiple windows for
40     drawing without actually waiting for that window's display callback.
41     Simply set the  current window   and draw immediately.  This is not
42     always advisable, but may be practical.
43
44     It is an error to set the  current window   to a non-existant window
45     (e.g., one that you have closed).  A warning will be printed on  stderr
46     if you try to do so, and the  current window   should be unchanged.
47

SEE ALSO

49     glutGetWindow(3)
50
51
52
53
54                                     Epoch
Impressum