Jelajahi Sumber

Fixed an error when compiling samples under MSVC that was caused by assuming including windows.h would pull in shellapi.h

Jared Mulconry 8 tahun lalu
induk
melakukan
539410d033

+ 2 - 1
samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp

@@ -13,6 +13,7 @@
 // http://nehe.gamedev.net/
 // ----------------------------------------------------------------------------
 #include <windows.h>
+#include <shellapi.h>
 #include <stdio.h>
 #include <GL/gl.h>
 #include <GL/glu.h>
@@ -666,7 +667,7 @@ BOOL CreateGLWindow(const char* title, int width, int height, int bits, bool ful
 		PFD_SUPPORT_OPENGL |							// Format Must Support OpenGL
 		PFD_DOUBLEBUFFER,								// Must Support Double Buffering
 		PFD_TYPE_RGBA,									// Request An RGBA Format
-		bits,											// Select Our Color Depth
+		BYTE(bits),											// Select Our Color Depth
 		0, 0, 0, 0, 0, 0,								// Color Bits Ignored
 		0,												// No Alpha Buffer
 		0,												// Shift Bit Ignored