diff --git a/CMakeLists.txt b/CMakeLists.txt index e159bcb..60c6d27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -693,7 +693,6 @@ elseif(WIN32) set(src_sys_base sys/cpu.cpp sys/threads.cpp - sys/glimp.cpp sys/events.cpp sys/sys_local.cpp sys/win32/win_input.cpp @@ -705,6 +704,7 @@ elseif(WIN32) ) set(src_sys_core + sys/glimp.cpp ) else() set(src_sys_base diff --git a/renderer/qgl.h b/renderer/qgl.h index a05bf0e..68b020e 100644 --- a/renderer/qgl.h +++ b/renderer/qgl.h @@ -32,8 +32,25 @@ If you have questions concerning this license or the applicable additional terms #ifndef __QGL_H__ #define __QGL_H__ +#if defined( ID_DEDICATED ) && defined( _WIN32 ) +// to allow stubbing gl on windows, define WINGDIAPI to nothing - it would otherwise be +// extended to __declspec(dllimport) on MSVC (our stub is no dll.) + #ifdef WINGDIAPI + #pragma push_macro("WINGDIAPI") + #undef WINGDIAPI + #define WINGDIAPI + #endif +#endif + #include +#if defined( ID_DEDICATED ) && defined( _WIN32 ) +// restore WINGDIAPI + #ifdef WINGDIAPI + #pragma pop_macro("WINGDIAPI") + #endif +#endif + typedef void (*GLExtension_t)(void); #ifdef __cplusplus