Sets the initial window size.
Windows created by glutCreateWindow will be requested to be created with the current initial window size. 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 size values is to provide a suggestion to the window system for a window?’s initial size. The window system is not obligated to use this information. Therefore, GLUT programs should not assume the window was created at the specified size. 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 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 | glutInitWindowPosition | glutReshapeFunc | Glut.ReshapeCallback