From 5a86d86eefaf0e0ef3e569ce3bc205e01fe0c5c8 Mon Sep 17 00:00:00 2001
From: dcnieho
@@ -479,6 +485,11 @@ the window will immediately snap out to this width, but the application can call glutReshapeWindow and make a window narrower again.
++If GLUT_ALLOW_NEGATIVE_WINDOW_POSITION is enabled, glutInitWindowPosition +will accept negative window coordinates. +
+If the application has two nested calls to glutMainLoop and calls glutLeaveMainLoop, the behaviour -of freeglut is undefined. It may leave only the inner nested +of FreeGLUT is undefined. It may leave only the inner nested loop or it may leave both loops. If the reader has a strong preference -for one behaviour over the other he should contact the freeglut Programming +for one behaviour over the other he should contact the FreeGLUT Programming Consortium and ask for the code to be fixed.
@@ -650,6 +661,44 @@ Consortium and ask for the code to be fixed.+The glutCreateSubwindow function creates a subwindow of an existing window. +
+ +Usage
+ ++int glutCreateSubwindow(int window, int x, int y, int width, int height); +
+ +Description
+ ++Creates a subwindow of window that is at location x and y +relative to the window's upper-left corner, and is of the specified width and height. The newly created +window ID is returned by glutCreateSubwindow. By default, the position coordinates will only allow windows within the bounds of the parent. +Negative coordinates be treated as coordinates from the opposite edge for a given axis. In addition, the width of the window will be taken into account. +For example, if the parent window is 100 pixels wide, and the x is 10, and width is 20, the subwindow will be located at x = 10. +If x is -10, then the subwindow will be located at 70 (parent - abs(pos) - dim). If the width or height are negative, then the dimension is taken as a +subtraction of the parent dimension. For example, if the parent window is 100 pixels wide, and the x is 10, and width is 20, the +subwindow will have a size of 20. If width is -20, then the subwindow will have a width of 70 (parent - pos - abs(dim)). +
+ ++If GLUT_ALLOW_NEGATIVE_WINDOW_POSITION is enabled, the window behavior differs. Negative window coordinates are now accepted and may result in windows outside +of the viewing area, depending on the platform of operation. Negative width and height are still used as a subtraction of the parent window dimension, +but they do not take x or y into account. For example, if the parent window is 100 pixels wide, and the x is 10, and width is 20, the +subwindow will be located at x = 10. If x is -10, then the subwindow will be located at x = -10. If the parent window is 100 pixels wide, +and the x is 10, and width is 20, the subwindow will have a size of 20. If width is -20, then the subwindow will have a width of 80 (parent - abs(dim)). +
+ +Changes From GLUT
+ ++GLUT does not support negative x or y. Nor does it have GLUT_ALLOW_NEGATIVE_WINDOW_POSITION +which changes the the functionality of glutCreateSubwindow. +
+