]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_os.cxx
Use the new clouds3d-enable property instead.
[flightgear.git] / src / Main / fg_os.cxx
index beaea1bee11a925e86549d44c7be17c5614b557f..b13cd2e7159f27fe5100d0dcdeb0793de889f88e 100644 (file)
@@ -1,12 +1,16 @@
-// The mac puts this in a weird location (GLUT/glut.h), so the
-// configure script detects the location and defines it as a macro.
+#ifndef _MSC_VER // MSVC really needs a definition for wchar_t
+#define _WCHAR_T_DEFINED 1 // Glut needs this, or else it tries to
+                           // redefine it
+#endif
+
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
-#  include FG_GLUT_H
-#else
-#  include <GL/glut.h>
 #endif
 
+#include <simgear/compiler.h>
+
+#include SG_GLUT_H
+
 #include <plib/pu.h>
 
 #include "fg_props.hxx"
@@ -187,7 +191,7 @@ void fgOSOpenWindow(int w, int h, int bpp, bool alpha,
 {
     int mode = GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE;
     if(alpha) mode |= GLUT_ALPHA;
-    if(stencil) mode |= GLUT_STENCIL;
+    if(stencil && bpp > 16) mode |= GLUT_STENCIL;
 
     glutInitDisplayMode(mode);
     glutInitWindowSize(w, h);
@@ -212,5 +216,5 @@ void fgOSOpenWindow(int w, int h, int bpp, bool alpha,
     glutIdleFunc(GLUTidle);
     glutDisplayFunc(GLUTdraw);
     glutReshapeFunc(GLUTreshape);
-
 }
+