Sets the initial window position.
Windows created by glutCreateWindow will be requested to be created with the current initial window position. 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 intent of the initial window position values is to provide a suggestion to the window system for a window?’s initial position. The window system is not obligated to use this information. Therefore, GLUT programs should not assume the window was created at the specified position.
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 default via a command line argument (such as -geometry for X11), call glutInitWindowSize and glutInitWindowPosition before your call to glutInit. For example:
using Tao.OpenGL; [STAThread] public static void Main(string[] args) { Glut.glutInitWindowSize(500, 300); Glut.glutInitWindowPosition(100, 100); Glut.glutInit(); }
However, if you'd like to force your program to start up at a given size and position, call glutInitWindowSize and glutInitWindowPosition after your call to glutInit. For example:
using Tao.OpenGL; [STAThread] public static void Main(string[] args) { Glut.glutInit(); Glut.glutInitWindowSize(500, 300); Glut.glutInitWindowPosition(100, 100); }
Glut Class | Tao.FreeGlut Namespace | glutCreateWindow | glutCreateSubWindow | glutGet | glutInit | glutInitWindowSize | glutReshapeFunc | Glut.ReshapeCallback