BsD3D9Prerequisites.h 2.1 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. /** @defgroup D3D9 BansheeD3D9RenderAPI
  22. * Wrapper around the DirectX 9 render API.
  23. */
  24. /** @} */
  25. namespace BansheeEngine
  26. {
  27. // Predefine classes
  28. class D3D9RenderAPI;
  29. class D3D9RenderWindow;
  30. class D3D9RenderWindowCore;
  31. class D3D9TextureCore;
  32. class D3D9TextureManager;
  33. class D3D9Driver;
  34. class D3D9DriverList;
  35. class D3D9VideoMode;
  36. class D3D9VideoModeList;
  37. class D3D9Device;
  38. class D3D9DeviceManager;
  39. class D3D9ResourceManager;
  40. class D3D9GpuProgram;
  41. class D3D9GpuProgramManager;
  42. class D3D9IndexBuffer;
  43. class D3D9HLSLProgramFactory;
  44. class D3D9HLSLProgramCore;
  45. class D3D9VertexDeclarationCore;
  46. class D3D9Resource;
  47. typedef std::shared_ptr<D3D9RenderWindow> D3D9RenderWindowPtr;
  48. /** @addtogroup D3D9
  49. * @{
  50. */
  51. /** DirectX 9 specific types to track resource statistics for. */
  52. enum D3D9RenderStatResourceType
  53. {
  54. RenderStatObject_VertexDeclaration = 100
  55. };
  56. /** @} */
  57. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(BS_STATIC_LIB)
  58. # ifdef BS_RSD3D9_EXPORTS
  59. # define BS_D3D9_EXPORT __declspec(dllexport)
  60. # else
  61. # if defined( __MINGW32__ )
  62. # define BS_D3D9_EXPORT
  63. # else
  64. # define BS_D3D9_EXPORT __declspec(dllimport)
  65. # endif
  66. # endif
  67. #else
  68. # define BS_D3D9_EXPORT
  69. #endif
  70. }