This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



glutInitWindowPosition(3GLUT)                       GLUT                       glutInitWindowPosition(3GLUT)



NAME
       glutInitWindowPositionWindowPosition,  glutInitWindowSize  - set the initial window position and size
       respectively.

SYNTAX
       void glutInitWindowSize(int width, int height);
       void glutInitWindowPosition(int x, int y);

ARGUMENTS
       width     Width in pixels.

       height    Height in pixels.

       x         Window X location in pixels.

       y         Window Y location in pixels.

DESCRIPTION
       Windows created by glutCreateWindow will be requested to be created with the current  initial  window
       position and size.

       The  initial value of the initial window position GLUT state is -1 and -1.  If either the X or Y com-ponent component
       ponent to the initial window position is negative, the actual window position is left to  the  window
       system  to  determine.   The  initial value of the initial window size GLUT state is 300 by 300.  The
       initial window size components must be greater than zero.

       The intent of the initial window position and size values is to provide a suggestion  to  the  window
       system  for  a  window's  initial  size  and position. The window system is not obligated to use this
       information.  Therefore, GLUT programs should not assume the window was created at the specified size
       or  position.  A  GLUT program should use the window's reshape callback to determine the true size of
       the window.

EXAMPLE
       If you would like your GLUT program to default to starting at a given screen location and at a  given
       size,  but  you  would  also like to let the user override these defaults via a command line argument
       (such as -geometry for X11), call glutInitWindowSize and glutInitWindowPosition before your  call  to
       glutInit.  For example:

         int main(int argc, char **argv)
         {
           glutInitWindowSize(500, 300);
           glutInitWindowPosition(100, 100);
           glutInit(&argc, argv);
           ...
         }

       However, if you'd like to force your program to start up at a given size, call glutInitWindowSize and
       glutInitWindowPosition after your call to glutInit.  For example:

         int main(int argc, char **argv)
         {
           glutInit(&argc, argv);
           glutInitWindowSize(500, 300);
           glutInitWindowPosition(100, 100);
           ...
         }

SEE ALSO
       glutInit(3G), glutCreateWindow(3G), glutCreateSubWindow(3G), glutReshapeFunc(3G), glutGet(3G)


AUTHOR
       Mark J. Kilgard (mjk@nvidia.com)



GLUT                                                 3.7                       glutInitWindowPosition(3GLUT)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...