- removed Windows.h include from gl_system.h and cleaned up that file. This means that most OpenGL sources can now be compiled without any Windows dependencies, which is significantly faster.
This commit is contained in:
parent
396c570a96
commit
e080f0cf89
3 changed files with 4 additions and 84 deletions
|
|
@ -1,40 +1,6 @@
|
|||
#ifndef __GL_PCH_H
|
||||
#define __GL_PCH_H
|
||||
#ifdef _WIN32
|
||||
//#define __RPCNDR_H__ // this header causes problems!
|
||||
//#define __wtypes_h__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define _WIN32_WINDOWS 0x410
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501 // Support the mouse wheel and session notification.
|
||||
#define _WIN32_IE 0x0500
|
||||
#endif
|
||||
#define DIRECTINPUT_VERSION 0x800
|
||||
#define DIRECTDRAW_VERSION 0x0300
|
||||
|
||||
#define DWORD WINDOWS_DWORD // I don't want to depend on this throughout the GL code!
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4995) // MIPS
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <winsock.h>
|
||||
#ifndef __WINE__
|
||||
#include <dshow.h>
|
||||
#endif
|
||||
#include <d3d9.h>
|
||||
//#include <dsound.h>
|
||||
//#include <dinput.h>
|
||||
//#include <lmcons.h>
|
||||
//#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
#undef DWORD
|
||||
#ifndef CALLBACK
|
||||
#define CALLBACK
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -73,33 +39,6 @@
|
|||
#include <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DWORD WINDOWS_DWORD // I don't want to depend on this throughout the GL code!
|
||||
//#include "gl/api/wglext.h"
|
||||
#ifndef __WINE__
|
||||
#undef DWORD
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned char byte;
|
||||
typedef float FLOAT;
|
||||
template <typename T>
|
||||
inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); }
|
||||
#define _access(a,b) access(a,b)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LoadMenu
|
||||
#undef LoadMenu
|
||||
#endif
|
||||
#ifdef DrawText
|
||||
#undef DrawText
|
||||
#endif
|
||||
#ifdef GetCharWidth
|
||||
#undef GetCharWidth
|
||||
#endif
|
||||
|
||||
#undef S_NORMAL
|
||||
#undef OPAQUE
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
@ -111,7 +50,4 @@ inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); }
|
|||
#pragma warning(disable : 4305) // truncate from double to float
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#undef WIN32
|
||||
#endif
|
||||
#endif //__GL_PCH_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue