BsD3D9Prerequisites.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #define D3D9_DEVICE_ACCESS_LOCK
  6. #define D3D9_DEVICE_ACCESS_UNLOCK
  7. #define D3D9_DEVICE_ACCESS_CRITICAL_SECTION
  8. #define DIRECT3D_VERSION 0x0900
  9. #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
  10. #if BS_DEBUG_MODE
  11. # define D3D_DEBUG_INFO
  12. #endif
  13. #define WIN32_LEAN_AND_MEAN
  14. #if !defined(NOMINMAX) && defined(_MSC_VER)
  15. # define NOMINMAX // required to stop windows.h messing up std::min
  16. #endif
  17. #include <d3d9.h>
  18. #include <d3dx9.h>
  19. #include <DxErr.h>
  20. /** @addtogroup Plugins
  21. * @{
  22. */
  23. /** @defgroup D3D9 BansheeD3D9RenderAPI
  24. * Wrapper around the DirectX 9 render API.
  25. */
  26. /** @} */
  27. namespace BansheeEngine
  28. {
  29. // Predefine classes
  30. class D3D9RenderAPI;
  31. class D3D9RenderWindow;
  32. class D3D9RenderWindowCore;
  33. class D3D9TextureCore;
  34. class D3D9TextureManager;
  35. class D3D9Driver;
  36. class D3D9DriverList;
  37. class D3D9VideoMode;
  38. class D3D9VideoModeList;
  39. class D3D9Device;
  40. class D3D9DeviceManager;
  41. class D3D9ResourceManager;
  42. class D3D9GpuProgram;
  43. class D3D9GpuProgramManager;
  44. class D3D9IndexBuffer;
  45. class D3D9HLSLProgramFactory;
  46. class D3D9HLSLProgramCore;
  47. class D3D9VertexDeclarationCore;
  48. class D3D9Resource;
  49. typedef std::shared_ptr<D3D9RenderWindow> D3D9RenderWindowPtr;
  50. /** @addtogroup D3D9
  51. * @{
  52. */
  53. /** DirectX 9 specific types to track resource statistics for. */
  54. enum D3D9RenderStatResourceType
  55. {
  56. RenderStatObject_VertexDeclaration = 100
  57. };
  58. /** @} */
  59. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(BS_STATIC_LIB)
  60. # ifdef BS_RSD3D9_EXPORTS
  61. # define BS_D3D9_EXPORT __declspec(dllexport)
  62. # else
  63. # if defined( __MINGW32__ )
  64. # define BS_D3D9_EXPORT
  65. # else
  66. # define BS_D3D9_EXPORT __declspec(dllimport)
  67. # endif
  68. # endif
  69. #else
  70. # define BS_D3D9_EXPORT
  71. #endif
  72. }