diff --git a/freeglut/freeglut/VisualStudio/2008/CallbackMaker/CallbackMaker.vcproj b/freeglut/freeglut/VisualStudio/2008/CallbackMaker/CallbackMaker.vcproj
index 52f091b..96f5713 100644
--- a/freeglut/freeglut/VisualStudio/2008/CallbackMaker/CallbackMaker.vcproj
+++ b/freeglut/freeglut/VisualStudio/2008/CallbackMaker/CallbackMaker.vcproj
@@ -49,6 +49,8 @@
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
+ CompileAs="1"
+ DisableSpecificWarnings="4996"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
diff --git a/freeglut/freeglut/VisualStudio/2010/CallbackMaker/CallbackMaker.vcxproj b/freeglut/freeglut/VisualStudio/2010/CallbackMaker/CallbackMaker.vcxproj
index 276a310..e73ec7b 100644
--- a/freeglut/freeglut/VisualStudio/2010/CallbackMaker/CallbackMaker.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/CallbackMaker/CallbackMaker.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/VisualStudio/2010/Fractals/Fractals.vcxproj b/freeglut/freeglut/VisualStudio/2010/Fractals/Fractals.vcxproj
index e41e6d4..9aef707 100644
--- a/freeglut/freeglut/VisualStudio/2010/Fractals/Fractals.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/Fractals/Fractals.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/VisualStudio/2010/Fractals_random/Fractals_random.vcxproj b/freeglut/freeglut/VisualStudio/2010/Fractals_random/Fractals_random.vcxproj
index 65887fa..b7b323e 100644
--- a/freeglut/freeglut/VisualStudio/2010/Fractals_random/Fractals_random.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/Fractals_random/Fractals_random.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/VisualStudio/2010/Lorenz/Lorenz.vcxproj b/freeglut/freeglut/VisualStudio/2010/Lorenz/Lorenz.vcxproj
index 41245cb..ff18a57 100644
--- a/freeglut/freeglut/VisualStudio/2010/Lorenz/Lorenz.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/Lorenz/Lorenz.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/VisualStudio/2010/One/One.vcxproj b/freeglut/freeglut/VisualStudio/2010/One/One.vcxproj
index 0f5da57..2b96f44 100644
--- a/freeglut/freeglut/VisualStudio/2010/One/One.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/One/One.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/VisualStudio/2010/freeglut.vcxproj b/freeglut/freeglut/VisualStudio/2010/freeglut.vcxproj
index e468d50..6729bf3 100644
--- a/freeglut/freeglut/VisualStudio/2010/freeglut.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/freeglut.vcxproj
@@ -27,6 +27,7 @@
StaticLibrary
false
MultiByte
+ true
DynamicLibrary
@@ -79,12 +80,14 @@
Disabled
..\..\include;%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_WINDOWS;_USRDLL;FREEGLUT_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ _DEBUG;WIN32;_WINDOWS;_USRDLL;FREEGLUT_EXPORTS;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
Level3
EditAndContinue
+ CompileAsC
+ 4996
_DEBUG;%(PreprocessorDefinitions)
@@ -108,13 +111,14 @@
Disabled
..\..\include;%(AdditionalIncludeDirectories)
- _DEBUG;FREEGLUT_STATIC;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ _DEBUG;FREEGLUT_STATIC;WIN32;_LIB;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebug
- true
Level3
EditAndContinue
+ CompileAsC
+ 4996
_DEBUG;%(PreprocessorDefinitions)
@@ -133,10 +137,13 @@
MaxSpeed
true
..\..\include;%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_WINDOWS;_USRDLL;FREEGLUT_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ NDEBUG;WIN32;_WINDOWS;_USRDLL;FREEGLUT_EXPORTS;%(PreprocessorDefinitions)
MultiThreadedDLL
true
Level3
+ AnySuitable
+ CompileAsC
+ 4996
NDEBUG;%(PreprocessorDefinitions)
@@ -158,14 +165,15 @@
MaxSpeed
- OnlyExplicitInline
+ AnySuitable
..\..\include;%(AdditionalIncludeDirectories)
- NDEBUG;FREEGLUT_STATIC;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
+ NDEBUG;FREEGLUT_STATIC;WIN32;_LIB;%(PreprocessorDefinitions)
MultiThreaded
true
Level3
- true
+ true
+ CompileAsC
+ 4996
NDEBUG;%(PreprocessorDefinitions)
@@ -222,4 +230,4 @@
-
+
\ No newline at end of file
diff --git a/freeglut/freeglut/VisualStudio/2010/shapes/shapes.vcxproj b/freeglut/freeglut/VisualStudio/2010/shapes/shapes.vcxproj
index 36a5a27..8da4952 100644
--- a/freeglut/freeglut/VisualStudio/2010/shapes/shapes.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/shapes/shapes.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/VisualStudio/2010/smooth_opengl3/smooth_opengl3.vcxproj b/freeglut/freeglut/VisualStudio/2010/smooth_opengl3/smooth_opengl3.vcxproj
index 38a6c04..d05b4f4 100644
--- a/freeglut/freeglut/VisualStudio/2010/smooth_opengl3/smooth_opengl3.vcxproj
+++ b/freeglut/freeglut/VisualStudio/2010/smooth_opengl3/smooth_opengl3.vcxproj
@@ -85,6 +85,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -105,6 +107,8 @@
Level3
EditAndContinue
+ CompileAsC
+ 4996
..\..\..\lib\Debug;%(AdditionalLibraryDirectories)
@@ -125,6 +129,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
@@ -147,6 +153,8 @@
Level3
ProgramDatabase
+ CompileAsC
+ 4996
..\..\..\lib\Release;%(AdditionalLibraryDirectories)
diff --git a/freeglut/freeglut/include/GL/freeglut_std.h b/freeglut/freeglut/include/GL/freeglut_std.h
index e10836b..ba1b716 100644
--- a/freeglut/freeglut/include/GL/freeglut_std.h
+++ b/freeglut/freeglut/include/GL/freeglut_std.h
@@ -57,7 +57,9 @@
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1
# endif
-# define NOMINMAX
+# ifndef NOMINMAX
+# define NOMINMAX
+# endif
# include
/* Windows static library */
diff --git a/freeglut/freeglut/src/freeglut_internal.h b/freeglut/freeglut/src/freeglut_internal.h
index 510764a..9bd0959 100644
--- a/freeglut/freeglut/src/freeglut_internal.h
+++ b/freeglut/freeglut/src/freeglut_internal.h
@@ -387,7 +387,7 @@ struct tagSFG_Display
#endif /* HAVE_X11_EXTENSIONS_XF86VMODE_H */
#elif TARGET_HOST_MS_WINDOWS
- HINSTANCE Instance; /* The application's instance */
+ HINSTANCE Instance; /* The application's instance */
DEVMODE DisplayMode; /* Desktop's display settings */
char *DisplayName; /* Display name for multi display support*/
diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c
index c3e67bd..81ce955 100644
--- a/freeglut/freeglut/src/freeglut_main.c
+++ b/freeglut/freeglut/src/freeglut_main.c
@@ -101,7 +101,6 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height )
freeglut_return_if_fail( window != NULL );
-
#if TARGET_HOST_POSIX_X11
XResizeWindow( fgDisplay.Display, window->Window.Handle,
@@ -233,6 +232,7 @@ static void fghcbDisplayWindow( SFG_Window *window,
#if TARGET_HOST_POSIX_X11
fghRedrawWindow ( window ) ;
#elif TARGET_HOST_MS_WINDOWS
+
RedrawWindow(
window->Window.Handle, NULL, NULL,
RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW
@@ -1743,7 +1743,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
switch( uMsg )
{
case WM_CREATE:
- /* The window structure is passed as the creation structure paramter... */
+ /* The window structure is passed as the creation structure parameter... */
window = (SFG_Window *) (((LPCREATESTRUCT) lParam)->lpCreateParams);
FREEGLUT_INTERNAL_ERROR_EXIT ( ( window != NULL ), "Cannot create window",
"fgWindowProc" );
@@ -1797,6 +1797,10 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
}
window->State.NeedToResize = GL_TRUE;
+ /* if we used CW_USEDEFAULT (thats a negative value) for the size
+ * of the window, query the window now for the size at which it
+ * was created.
+ */
if( ( window->State.Width < 0 ) || ( window->State.Height < 0 ) )
{
SFG_Window *current_window = fgStructure.CurrentWindow;