diff -urN glut-3.7.6_orig\include\GL\glut.h glut-3.7.6\include\GL\glut.h
--- glut-3.7.6_orig\include\GL\glut.h	Wed Dec 13 00:22:52 2000
+++ glut-3.7.6\include\GL\glut.h	Sat Oct 23 11:28:08 2004
@@ -245,6 +245,10 @@
 #define GLUT_LEFT_BUTTON		0
 #define GLUT_MIDDLE_BUTTON		1
 #define GLUT_RIGHT_BUTTON		2
+#define GLUT_WHEEL_UP			3
+#define GLUT_WHEEL_DOWN			4
+#define GLUT_XBUTTON1			5
+#define GLUT_XBUTTON2			6
 
 /* Mouse button  state. */
 #define GLUT_DOWN			0
diff -urN glut-3.7.6_orig\lib\glut\glut32.dsp glut-3.7.6\lib\glut\glut32.dsp
--- glut-3.7.6_orig\lib\glut\glut32.dsp	Thu Nov 08 02:19:10 2001
+++ glut-3.7.6\lib\glut\glut32.dsp	Sat Oct 23 11:28:55 2004
@@ -1,5 +1,5 @@
 # Microsoft Developer Studio Project File - Name="glut32" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
 # ** DO NOT EDIT **
 
 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
@@ -22,7 +22,6 @@
 !MESSAGE 
 
 # Begin Project
-# PROP AllowPerConfigDependencies 0
 # PROP Scc_ProjName ""
 # PROP Scc_LocalPath ""
 CPP=cl.exe
@@ -55,10 +54,12 @@
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib glu32.lib opengl32.lib /nologo /dll /machine:I386 /nodefaultlib:"glut32.lib"
 # Begin Special Build Tool
-TargetDir=.\Release
-SOURCE="$(InputPath)"
+TargetDir=".\Release"
+SOURCE=$(InputPath)
 PostBuild_Desc=Copying libraries, headers & dll's...
-PostBuild_Cmds=copy $(TARGETDIR)\glut32.dll %WINDIR%\SYSTEM	copy $(TARGETDIR)\glut32.lib "$(MSDevDir)\..\..\VC98\lib"	copy ..\..\include\GL\glut.h "$(MSDevDir)\..\..\VC98\include\GL"
+PostBuild_Cmds=copy $(TARGETDIR)\glut32.dll %WINDIR%\SYSTEM	copy\
+ $(TARGETDIR)\glut32.lib "$(MSDevDir)\..\VC\lib"	copy\
+ ..\..\include\GL\glut.h "$(MSDevDir)\..\VC\include\GL"
 # End Special Build Tool
 
 !ELSEIF  "$(CFG)" == "glut32 - Win32 Debug"
@@ -74,8 +75,8 @@
 # PROP Intermediate_Dir "Debug"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLUT32_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLUT32_EXPORTS" /YX /FD /GZ /c
+# ADD BASE CPP /nologo /MTd /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLUT32_EXPORTS" /YX /FD /ZI /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLUT32_EXPORTS" /YX /FD /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -87,10 +88,12 @@
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib glu32.lib opengl32.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"glut32.lib" /pdbtype:sept
 # Begin Special Build Tool
-TargetDir=.\Debug
-SOURCE="$(InputPath)"
+TargetDir=".\Debug"
+SOURCE=$(InputPath)
 PostBuild_Desc=Copying libraries, headers & dll's...
-PostBuild_Cmds=copy $(TARGETDIR)\glut32.dll %WINDIR%\SYSTEM32	copy $(TARGETDIR)\glut32.lib "$(MSDevDir)\..\..\VC98\lib"	copy ..\..\include\GL\glut.h "$(MSDevDir)\..\..\VC98\include\GL"
+PostBuild_Cmds=copy $(TARGETDIR)\glut32.dll %WINDIR%\SYSTEM32	copy\
+ $(TARGETDIR)\glut32.lib "$(MSDevDir)\..\VC\lib"	copy ..\..\include\GL\glut.h\
+ "$(MSDevDir)\..\VC\include\GL"
 # End Special Build Tool
 
 !ENDIF 
@@ -114,6 +117,13 @@
 # Begin Source File
 
 SOURCE=.\glut.rc
+
+!IF  "$(CFG)" == "glut32 - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "glut32 - Win32 Debug"
+
+!ENDIF 
+
 # End Source File
 # Begin Source File
 
diff -urN glut-3.7.6_orig\lib\glut\glut_init.c glut-3.7.6\lib\glut\glut_init.c
--- glut-3.7.6_orig\lib\glut\glut_init.c	Thu Nov 08 00:47:14 2001
+++ glut-3.7.6\lib\glut\glut_init.c	Sat Oct 23 11:28:08 2004
@@ -114,6 +114,15 @@
   __glutScreenWidth     = GetSystemMetrics(SM_CXSCREEN);
   __glutScreenHeight    = GetSystemMetrics(SM_CYSCREEN);
 
+#ifdef SM_CXVIRTUALSCREEN
+  if (GetSystemMetrics(SM_CXVIRTUALSCREEN) > 0)
+	  __glutScreenWidth  = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+#endif
+#ifdef SM_CYVIRTUALSCREEN
+  if (GetSystemMetrics(SM_CYVIRTUALSCREEN) > 0)
+	  __glutScreenHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN);
+#endif
+
   /* Set the root window to NULL because windows creates a top-level
      window when the parent is NULL.  X creates a top-level window
      when the parent is the root window. */
diff -urN glut-3.7.6_orig\lib\glut\win32_winproc.c glut-3.7.6\lib\glut\win32_winproc.c
--- glut-3.7.6_orig\lib\glut\win32_winproc.c	Thu Nov 08 02:02:22 2001
+++ glut-3.7.6\lib\glut\win32_winproc.c	Sat Oct 23 11:28:08 2004
@@ -1,6 +1,10 @@
 
 /* Copyright (c) Nate Robins, 1997, 2001. */
-/* portions Copyright (c) Mark Kilgard, 1997, 1998. */
+/* portions Copyright (c) Mark Kilgard, 1997, 1998.    */
+
+/* Modified by Peter Dey to add Mouse Wheel support    *
+ * Modified by Ville Herva to add MultiMonitor support *
+ *   and 5-button Mouse support                        */
 
 /* 
 This program is freely distributable without licensing fees 
@@ -23,6 +27,24 @@
 #include <mmsystem.h>  /* Win32 Multimedia API header. */
 #endif
 
+#ifndef WM_MOUSEWHEEL
+/* Old versions of MSC don't define the message number.
+   Apart from this, there is no need to check if a mouse
+   wheel is implemented either at build or run time. */
+#define WM_MOUSEWHEEL 0x020A
+#endif
+
+#ifndef WM_XBUTTONDOWN
+#define WM_XBUTTONDOWN                  0x020B
+#define WM_XBUTTONUP                    0x020C
+#define WM_XBUTTONDBLCLK                0x020D
+#endif
+
+#ifndef MK_XBUTTON1
+#define MK_XBUTTON1         0x0020
+#define MK_XBUTTON2         0x0040
+#endif
+
 extern unsigned __glutMenuButton;
 extern GLUTidleCB __glutIdleFunc;
 extern GLUTtimer *__glutTimerList;
@@ -700,6 +722,8 @@
 
 LONG WINAPI __glutWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
 {
+	static short lastXButton = 0;
+
 	switch ( msg ) 
 	{
 	case WM_CREATE:			return HANDLE_WM_CREATE 		( hwnd, wparam, lparam, __glutOnCreate			);
@@ -755,6 +779,57 @@
 	case MM_JOY1BUTTONUP:
 		return __glutOnJoystick( hwnd );
 		
+	case WM_MOUSEWHEEL:
+		{
+		POINT point;
+		int   scroll;
+
+		/* Treat the scroll wheel as a short vertical drag with
+		   the middle button down. (From current mouse location,
+		   in case the app is tracking GUI widgets.) Good for
+		   3D zooming in/out as seen in the game Homeworld. */
+		scroll = (signed short)HIWORD(wparam);
+		GetCursorPos(&point);
+		ScreenToClient(hwnd, &point);
+		/* Wheel value is a signed int between (usually) -3 to +3,
+		   multiplied by 120 for reasons known only to Microsoft.
+		   Positive value is "up". */
+		scroll = - (scroll / 120);
+		/* Now we've got the raw value, translate it into a mouse
+		   distance that the application won't ignore as jitter.
+		   10 pixels per step works well for me. Smarter code would
+		   factor in the system preference and/or do some kind of
+		   speedup on consecutive wheel rotates. */
+		if (scroll < 0)
+		  __glutOnButtonUp(hwnd, point.x, point.y, GLUT_WHEEL_UP);
+		else
+		  __glutOnButtonUp(hwnd, point.x, point.y, GLUT_WHEEL_DOWN);
+
+		return TRUE;
+		}
+		break;
+
+	case WM_XBUTTONDOWN: 	
+		{
+		POINT point;
+		lastXButton = LOWORD(wparam);
+		GetCursorPos(&point);
+		ScreenToClient(hwnd, &point);
+		__glutOnButtonDn(hwnd, point.x, point.y, 
+			lastXButton & MK_XBUTTON1 ? GLUT_XBUTTON1 : GLUT_XBUTTON2);
+		return TRUE;
+		}
+	case WM_XBUTTONUP: 	
+		{
+		// We get MK_XBUTTON1/MK_XBUTTON2 in wparam only on WM_XBUTTONDOWN
+		POINT point;
+		GetCursorPos(&point);
+		ScreenToClient(hwnd, &point);
+		__glutOnButtonUp(hwnd, point.x, point.y, 
+			lastXButton & MK_XBUTTON1 ? GLUT_XBUTTON1 : GLUT_XBUTTON2);
+		return TRUE;
+		}
+
 	default:
 		break;
 	}
