BsD3D9Prerequisites.h 1.9 KB

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