Only in freeglut: config.h
Only in freeglut: config.log
Only in freeglut: config.status
Only in freeglut/doc: Makefile
diff -ru freeglut-2.4.0/include/GL/freeglut_ext.h freeglut/include/GL/freeglut_ext.h
--- freeglut-2.4.0/include/GL/freeglut_ext.h	2005-03-23 06:14:32.000000000 -0900
+++ freeglut/include/GL/freeglut_ext.h	2007-03-29 22:18:39.000000000 -0800
@@ -65,6 +65,15 @@
 
 #define  GLUT_RENDERING_CONTEXT             0x01FD
 #define  GLUT_DIRECT_RENDERING              0x01FE
+#define  GLUT_WINDOW_HANDLE                 0x01FF /* Current glutWindow's X11 "Window", or Windows "HWIND" */
+#define  GLUT_WINDOW_CONTEXT                0x0200 /* Current glutWindow's X11 "GLXContext", or Windows "HGLRC" */
+#define  GLUT_WINDOW_CHILD                  0xF000 /* glutGut(GLUT_WINDOW_CHILD+i) returns the current window's i'th child's window ID */
+
+/*
+ * glutGetPointer parameters
+ */
+#define  GLUT_DISPLAY_HANDLE               0x0400 /* X11 "Display *", or Windows "HINSTANCE" */
+FGAPI void*   FGAPIENTRY glutGetPointer(GLenum what);
 
 /*
  * New tokens for glutInitDisplayMode.
Only in freeglut/include/GL: freeglut_ext.h.orig
Only in freeglut/include/GL: Makefile
Only in freeglut/include: Makefile
Only in freeglut: libtool
Only in freeglut: Makefile
Only in freeglut: patch
Only in freeglut/progs/demos/CallbackMaker: .deps
Only in freeglut/progs/demos/CallbackMaker: Makefile
Only in freeglut/progs/demos/Fractals: .deps
Only in freeglut/progs/demos/Fractals: Makefile
Only in freeglut/progs/demos/Fractals_random: .deps
Only in freeglut/progs/demos/Fractals_random: Makefile
Only in freeglut/progs/demos/Lorenz: .deps
Only in freeglut/progs/demos/Lorenz: Makefile
Only in freeglut/progs/demos: Makefile
Only in freeglut/progs/demos/One: .deps
Only in freeglut/progs/demos/One: Makefile
Only in freeglut/progs/demos/shapes: .deps
Only in freeglut/progs/demos/shapes: Makefile
Only in freeglut/progs: Makefile
Only in freeglut/src: .deps
diff -ru freeglut-2.4.0/src/freeglut_state.c freeglut/src/freeglut_state.c
--- freeglut-2.4.0/src/freeglut_state.c	2005-04-22 06:17:31.000000000 -0800
+++ freeglut/src/freeglut_state.c	2007-03-29 22:21:01.000000000 -0800
@@ -269,6 +269,7 @@
 
         return fgStructure.CurrentWindow->Window.VisualInfo->visualid;
 
+
 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
 
     /* Handle the OpenGL inquiries */
@@ -449,14 +450,54 @@
         return fgState.DirectContext;
         break;
 
+    case GLUT_WINDOW_HANDLE:
+        if( fgStructure.CurrentWindow == NULL )
+            return 0;
+        return (int)(fgStructure.CurrentWindow->Window.Handle);
+    case GLUT_WINDOW_CONTEXT:
+        if( fgStructure.CurrentWindow == NULL )
+            return 0;
+        return (int)(fgStructure.CurrentWindow->Window.Context);
+
     default:
-        fgWarning( "glutGet(): missing enum handle %d", eWhat );
+        if (eWhat>=GLUT_WINDOW_CHILD &&
+            eWhat<GLUT_WINDOW_CHILD+glutGet(GLUT_WINDOW_NUM_CHILDREN)) 
+        { /* Return the ID of one of our child windows */
+            int childNo=eWhat-GLUT_WINDOW_CHILD; 
+	    SFG_Node *cur=fgStructure.CurrentWindow->Children.First;
+	    while (childNo>0) {cur=cur->Next; childNo--;}
+	    return (( SFG_Window * )cur)->ID;
+        }
+        fgWarning( "glutGet(): invalid enum handle %d", eWhat );
         break;
     }
     return -1;
 }
 
 /*
+ * freeglut changes for MPIglut support, Orion Sky Lawlor (2007/01)
+ * General settings query method, returning a pointer.
+ *  This is needed in addition to glutGet because on 64-bit platforms,
+ *  an "int" isn't big enough to fit an entire pointer.
+ */
+void*   FGAPIENTRY glutGetPointer(GLenum eWhat)
+{
+    switch( eWhat ) {
+#if TARGET_HOST_UNIX_X11
+    case GLUT_DISPLAY_HANDLE:
+        return fgDisplay.Display;
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
+    case GLUT_DISPLAY_HANDLE:
+        return fgDisplay.Instance;
+#endif
+    default:
+        fgWarning( "glutGetPointer(): invalid enum handle %d", eWhat );
+        break;
+    }
+    return 0;
+}
+
+/*
  * Returns various device information.
  */
 int FGAPIENTRY glutDeviceGet( GLenum eWhat )
Only in freeglut/src: freeglut_state.c.orig
diff -ru freeglut-2.4.0/src/freeglut_window.c freeglut/src/freeglut_window.c
--- freeglut-2.4.0/src/freeglut_window.c	2005-05-19 16:47:37.000000000 -0800
+++ freeglut/src/freeglut_window.c	2007-03-29 22:18:39.000000000 -0800
@@ -275,6 +275,15 @@
     fgStructure.CurrentWindow = window;
 }
 
+#if TARGET_HOST_UNIX_X11
+/* 
+Orion Sky Lawlor, freeglut changes for MPIglut support (2007/01)
+SILLY hack: programs can set this global, to override the default Window
+   used as the parent of new top-level windows.  This allows freeglut windows
+   to live as subwindows of user-created X windows.
+*/
+Window fgOverrideParentWindow=0;
+#endif
 
 /*
  * Opens a window. Requires a SFG_Window object created and attached
@@ -288,6 +297,7 @@
     XSetWindowAttributes winAttr;
     XTextProperty textProperty;
     XSizeHints sizeHints;
+    Window parentWindow;
     XWMHints wmHints;
     unsigned long mask;
     unsigned int current_DisplayMode = fgState.DisplayMode ;
@@ -356,10 +366,14 @@
         mask |= CWOverrideRedirect;
     }
 
+    parentWindow=fgDisplay.RootWindow;
+    if ( window->Parent ) parentWindow=window->Parent->Window.Handle;
+    /* Orion Sky Lawlor, freeglut changes for MPIglut support (2007/01) */
+    if ( fgOverrideParentWindow ) parentWindow=fgOverrideParentWindow;
+
     window->Window.Handle = XCreateWindow(
         fgDisplay.Display,
-        window->Parent == NULL ? fgDisplay.RootWindow :
-        window->Parent->Window.Handle,
+        parentWindow,
         x, y, w, h, 0,
         window->Window.VisualInfo->depth, InputOutput,
         window->Window.VisualInfo->visual, mask,
Only in freeglut/src: freeglut_window.c.orig
Only in freeglut/src: libglut.la
Only in freeglut/src: libglut_la-freeglut_callbacks.lo
Only in freeglut/src: libglut_la-freeglut_callbacks.o
Only in freeglut/src: libglut_la-freeglut_cursor.lo
Only in freeglut/src: libglut_la-freeglut_cursor.o
Only in freeglut/src: libglut_la-freeglut_display.lo
Only in freeglut/src: libglut_la-freeglut_display.o
Only in freeglut/src: libglut_la-freeglut_ext.lo
Only in freeglut/src: libglut_la-freeglut_ext.o
Only in freeglut/src: libglut_la-freeglut_font_data.lo
Only in freeglut/src: libglut_la-freeglut_font_data.o
Only in freeglut/src: libglut_la-freeglut_font.lo
Only in freeglut/src: libglut_la-freeglut_font.o
Only in freeglut/src: libglut_la-freeglut_gamemode.lo
Only in freeglut/src: libglut_la-freeglut_gamemode.o
Only in freeglut/src: libglut_la-freeglut_geometry.lo
Only in freeglut/src: libglut_la-freeglut_geometry.o
Only in freeglut/src: libglut_la-freeglut_glutfont_definitions.lo
Only in freeglut/src: libglut_la-freeglut_glutfont_definitions.o
Only in freeglut/src: libglut_la-freeglut_init.lo
Only in freeglut/src: libglut_la-freeglut_init.o
Only in freeglut/src: libglut_la-freeglut_joystick.lo
Only in freeglut/src: libglut_la-freeglut_joystick.o
Only in freeglut/src: libglut_la-freeglut_main.lo
Only in freeglut/src: libglut_la-freeglut_main.o
Only in freeglut/src: libglut_la-freeglut_menu.lo
Only in freeglut/src: libglut_la-freeglut_menu.o
Only in freeglut/src: libglut_la-freeglut_misc.lo
Only in freeglut/src: libglut_la-freeglut_misc.o
Only in freeglut/src: libglut_la-freeglut_overlay.lo
Only in freeglut/src: libglut_la-freeglut_overlay.o
Only in freeglut/src: libglut_la-freeglut_state.lo
Only in freeglut/src: libglut_la-freeglut_state.o
Only in freeglut/src: libglut_la-freeglut_stroke_mono_roman.lo
Only in freeglut/src: libglut_la-freeglut_stroke_mono_roman.o
Only in freeglut/src: libglut_la-freeglut_stroke_roman.lo
Only in freeglut/src: libglut_la-freeglut_stroke_roman.o
Only in freeglut/src: libglut_la-freeglut_structure.lo
Only in freeglut/src: libglut_la-freeglut_structure.o
Only in freeglut/src: libglut_la-freeglut_teapot.lo
Only in freeglut/src: libglut_la-freeglut_teapot.o
Only in freeglut/src: libglut_la-freeglut_videoresize.lo
Only in freeglut/src: libglut_la-freeglut_videoresize.o
Only in freeglut/src: libglut_la-freeglut_window.lo
Only in freeglut/src: libglut_la-freeglut_window.o
Only in freeglut/src: .libs
Only in freeglut/src: Makefile
