GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GLUTINITWINDOWPOSITION (3)

NAME

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

CONTENTS

Syntax
Arguments
Description
Example
See Also
Author

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 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.

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, glutCreateWindow, glutCreateSubWindow, glutReshapeFunc, glutGet

AUTHOR

Mark J. Kilgard (mjk@nvidia.com)
Search for    or go to Top of page |  Section 3 |  Main Index


GLUT GLUTINITWINDOWPOSITION (3GLUT) 3.7

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.