From 836fe46441ad9fc3ba1e6b2d1dc9da0e26353b21 Mon Sep 17 00:00:00 2001 From: Rcmaniac25 Date: Sun, 13 Dec 2015 16:53:20 -0500 Subject: [PATCH] Additional clarification about GLUT_ALLOW_NEGATIVE_WINDOW_POSITION --- freeglut/web-src/docs/api.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index d9b672f..37d75e5 100644 --- a/freeglut/web-src/docs/api.php +++ b/freeglut/web-src/docs/api.php @@ -313,10 +313,14 @@ upper left hand corner of the outside of the window (the non-client area) is at (x,y) and the size of the drawable (client) area is (w,h). The coordinates taken by glutInitPosition and glutPositionWindow, as well as the coordinates provided by -FreeGLUT when it calls the glutPositionFunc callback, -specify the top-left of the non-client area of the window. +freeglut when it calls the glutPositionFunc callback, +specify the top-left of the non-client area of the window. By default +only positive-signed coordinates are supported. If GLUT_ALLOW_NEGATIVE_WINDOW_POSITION +is enabled, then negative coordinates are supported. An exception +for glutPositionWindow exists as it's always supported negative +window coordinates.
  • When you query the size and position of the window using -glutGet, FreeGLUT will return the size of the drawable +glutGet, freeglut will return the size of the drawable area--the (w,h) that you specified when you created the window--and the coordinates of the upper left hand corner of the drawable (client) area--which is NOT the (x,y) position of the window you specified @@ -440,7 +444,7 @@ functions specify a desired position and size for windows that freeglut will create in the future. The position is measured in pixels from the upper left hand corner of the screen, with "x" increasing to the right and "y" increasing towards the bottom -of the screen. The size is measured in pixels. Freeglut +of the screen. The size is measured in pixels. Freeglut does not promise to follow these specifications in creating its windows, but it certainly makes an attempt to.

    @@ -463,7 +467,8 @@ coordinates. But if GLUT_ALLOW_NEGATIVE_WINDOW_POSITION is enabled, then negative window coordinates can be used. This is useful for multi-montitor setups where the second monitor may be in the negative desktop space of the primary monitor, as now the window can be placed -on the additional monitors. +on the additional monitors. Furthermore, this flag also determines how +negative coordinates and sizes are interpreted for subwindows.