BsD3D9Prerequisites.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. /** @addtogroup D3D9
  50. * @{
  51. */
  52. /** DirectX 9 specific types to track resource statistics for. */
  53. enum D3D9RenderStatResourceType
  54. {
  55. RenderStatObject_VertexDeclaration = 100
  56. };
  57. /** @} */
  58. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(BS_STATIC_LIB)
  59. # ifdef BS_RSD3D9_EXPORTS
  60. # define BS_D3D9_EXPORT __declspec(dllexport)
  61. # else
  62. # if defined( __MINGW32__ )
  63. # define BS_D3D9_EXPORT
  64. # else
  65. # define BS_D3D9_EXPORT __declspec(dllimport)
  66. # endif
  67. # endif
  68. #else
  69. # define BS_D3D9_EXPORT
  70. #endif
  71. }