mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
Add windows_with_undefs.h to fix conflicts with windows.h
windows.h adds macros such as `#define GetMessage GetMessageA` which cause conflicts in naming when for example a class definition is before windows.h and a use is after windows.h Add a header that can be used both to include windows.h and remove defines, and to only remove defines (when windows.h is included by) external dependencies.
This commit is contained in:
committed by
Corentin Wallez
parent
6aaa10fa60
commit
629c11baad
@@ -25,4 +25,10 @@
|
||||
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
||||
// Remove windows.h macros after d3d12's include of windows.h
|
||||
#include "common/Platform.h"
|
||||
#if defined(NXT_PLATFORM_WINDOWS)
|
||||
# include "common/windows_with_undefs.h"
|
||||
#endif
|
||||
|
||||
#endif // BACKEND_D3D12_D3D12PLATFORM_H_
|
||||
|
||||
@@ -19,9 +19,15 @@
|
||||
|
||||
#include "backend/Device.h"
|
||||
#include "backend/opengl/Forward.h"
|
||||
#include "common/Platform.h"
|
||||
|
||||
#include "glad/glad.h"
|
||||
|
||||
// Remove windows.h macros after glad's include of windows.h
|
||||
#if defined(NXT_PLATFORM_WINDOWS)
|
||||
# include "common/windows_with_undefs.h"
|
||||
#endif
|
||||
|
||||
namespace backend { namespace opengl {
|
||||
|
||||
class Device : public DeviceBase {
|
||||
|
||||
Reference in New Issue
Block a user