TestFramework.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <Jolt/Jolt.h>
  6. // Disable common warnings
  7. JPH_SUPPRESS_WARNINGS
  8. JPH_CLANG_SUPPRESS_WARNING("-Wheader-hygiene")
  9. #ifdef JPH_DOUBLE_PRECISION
  10. JPH_CLANG_SUPPRESS_WARNING("-Wdouble-promotion")
  11. #endif // JPH_DOUBLE_PRECISION
  12. JPH_CLANG_SUPPRESS_WARNING("-Wswitch-enum")
  13. JPH_CLANG_SUPPRESS_WARNING("-Wswitch")
  14. JPH_MSVC_SUPPRESS_WARNING(4061) // enumerator 'X' in switch of enum 'X' is not explicitly handled by a case label
  15. JPH_MSVC_SUPPRESS_WARNING(4062) // enumerator 'X' in switch of enum 'X' is not handled
  16. #ifdef JPH_PLATFORM_WINDOWS
  17. #ifdef _WIN32_WINNT
  18. #undef _WIN32_WINNT
  19. #endif
  20. #define Ellipse DrawEllipse // Windows.h defines a name that we would like to use
  21. #include <Jolt/Compute/DX12/IncludeDX12.h>
  22. #undef Ellipse
  23. #undef DrawText // We don't want this to map to DrawTextW
  24. #elif defined(JPH_PLATFORM_LINUX)
  25. #define Font X11Font
  26. #include <X11/Xlib.h>
  27. #include <X11/Xutil.h>
  28. #include <X11/XKBlib.h>
  29. #undef Font
  30. #undef Success
  31. #undef None
  32. #undef Convex
  33. #endif
  34. using namespace JPH;
  35. using namespace JPH::literals;