next up previous contents index
Next: 2.3 glutInitDisplayMode Up: 2 Initialization Previous: 2.1 glutInit

2.2 glutInitWindowPosition, glutInitWindowSize

  glutInitWindowPosition and   glutInitWindowSize set the initial window position and size respectively.

Usage

void glutInitWindowSize(int width, int height);
void glutInitWindowPosition(int x, int y);
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 component 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.



next up previous contents index
Next: 2.3 glutInitDisplayMode Up: 2 Initialization Previous: 2.1 glutInit



Mark Kilgard
Fri Feb 23 08:05:02 PST 1996