BsPrerequisitesUtil.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #pragma once
  2. #include <assert.h>
  3. /** @defgroup Utility Utility
  4. * Lowest layer of the engine containing a collection of very decoupled and separate systems that are
  5. * likely to be used throughout all of the higher layers.
  6. * @{
  7. */
  8. /** @defgroup Math Math
  9. * Math utility library containing a variety of general purpose math functionality.
  10. */
  11. /** @defgroup RTTI RTTI
  12. * A set of systems for defining and using run-time type information.
  13. */
  14. /** @defgroup Memory Memory
  15. * A set of methods and classes meant to manipulate memory.
  16. */
  17. /** @defgroup Containers Containers
  18. * Contains a set of templated commonly used containers.
  19. */
  20. /** @defgroup Debug Debug
  21. * Contains various functionality used to help with debugging.
  22. */
  23. /** @} */
  24. // 0 - No thread support
  25. // 1 - Render system is thread safe (TODO: NOT WORKING and will probably be removed)
  26. // 2 - Thread support but render system can only be accessed from main thread
  27. #define BS_THREAD_SUPPORT 2
  28. #define BS_PROFILING_ENABLED 1
  29. // Versions
  30. #define BS_VER_DEV 1
  31. #define BS_VER_PREVIEW 2
  32. #define BS_VER BS_VER_DEV
  33. // Platform-specific stuff
  34. #include "BsPlatformDefines.h"
  35. #if BS_COMPILER == BS_COMPILER_MSVC
  36. // TODO - This is not deactivated anywhere, therefore it applies to any file that includes this header.
  37. // - Right now I don't have an easier way to apply these warnings globally so I'm keeping it this way.
  38. // Secure versions aren't multiplatform, so we won't be using them
  39. #define _CRT_SECURE_NO_WARNINGS
  40. // disable: "<type> needs to have dll-interface to be used by clients'
  41. // Happens on STL member variables which are not public therefore is ok
  42. # pragma warning (disable: 4251)
  43. // disable: 'X' Function call with parameters that may be unsafe
  44. # pragma warning(disable: 4996)
  45. // disable: decorated name length exceeded, name was truncated
  46. // Happens with really long type names. Even fairly standard use
  47. // of std::unordered_map with custom parameters, meaning I can't
  48. // really do much to avoid it. It shouldn't effect execution
  49. // but might cause problems if you compile library
  50. // with one compiler and use it in another.
  51. # pragma warning(disable: 4503)
  52. // disable: C++ exception handler used, but unwind semantics are not enabled
  53. // We don't care about this as any exception is meant to crash the program.
  54. # pragma warning(disable: 4530)
  55. #endif
  56. // Short-hand names for various built-in types
  57. #include "BsTypes.h"
  58. #include "BsMemoryAllocator.h"
  59. // Useful threading defines
  60. #include "BsThreadDefines.h"
  61. // Commonly used standard headers
  62. #include "BsStdHeaders.h"
  63. // Forward declarations
  64. #include "BsFwdDeclUtil.h"
  65. #include "BsRTTIPrerequisites.h"
  66. #include "BsString.h"
  67. #include "BsMessageHandlerFwd.h"
  68. #include "BsUtil.h"
  69. #include "BsPath.h"
  70. #include "BsStringID.h"
  71. #include "BsEvent.h"
  72. #include "BsPlatformUtility.h"
  73. #include "BsCrashHandler.h"