BsD3D11Prerequisites.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
  6. #if BS_DEBUG_MODE
  7. # define D3D_DEBUG_INFO
  8. #endif
  9. #define WIN32_LEAN_AND_MEAN
  10. #if !defined(NOMINMAX) && defined(_MSC_VER)
  11. # define NOMINMAX // Required to stop windows.h messing up std::min
  12. #endif
  13. #include <d3d11.h>
  14. #include <d3d11shader.h>
  15. #include <D3Dcompiler.h>
  16. /** @addtogroup Plugins
  17. * @{
  18. */
  19. /** @defgroup D3D11 BansheeD3D11RenderAPI
  20. * Wrapper around the DirectX 11 render API.
  21. */
  22. /** @} */
  23. namespace BansheeEngine
  24. {
  25. class D3D11RenderAPI;
  26. class D3D11RenderWindow;
  27. class D3D11Texture;
  28. class D3D11TextureManager;
  29. class D3D11DepthBuffer;
  30. class D3D11Driver;
  31. class D3D11DriverList;
  32. class D3D11VideoMode;
  33. class D3D11VideoModeList;
  34. class D3D11GpuProgramManager;
  35. class D3D11IndexBuffer;
  36. class D3D11HardwareConstantBuffer;
  37. class D3D11HLSLProgramFactory;
  38. class D3D11HLSLProgram;
  39. class D3D11VertexDeclaration;
  40. class D3D11Device;
  41. class D3D11HardwareBuffer;
  42. class D3D11GpuVertexProgram;
  43. class D3D11GpuFragmentProgram;
  44. class D3D11GpuGeometryProgram;
  45. class D3D11GpuHullProgram;
  46. class D3D11GpuDomainProgram;
  47. class D3D11BlendState;
  48. class D3D11RasterizerState;
  49. class D3D11SamplerState;
  50. class D3D11DepthStencilState;
  51. class D3D11InputLayoutManager;
  52. class D3D11GpuBufferCore;
  53. class D3D11RenderUtility;
  54. class D3D11GpuProgramCore;
  55. class D3D11TextureView;
  56. class D3D11GpuBufferView;
  57. /** DirectX 11 specific types to track resource statistics for. */
  58. enum D3D11RenderStatResourceType
  59. {
  60. RenderStatObject_DepthStencilState = 100,
  61. RenderStatObject_RasterizerState,
  62. RenderStatObject_BlendState,
  63. RenderStatObject_SamplerState,
  64. RenderStatObject_InputLayout,
  65. RenderStatObject_ResourceView,
  66. RenderStatObject_SwapChain
  67. };
  68. typedef Vector<char*> HLSLMicroCode;
  69. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(BS_STATIC_LIB)
  70. # ifdef BS_RSD3D11_EXPORTS
  71. # define BS_D3D11_EXPORT __declspec(dllexport)
  72. # else
  73. # if defined( __MINGW32__ )
  74. # define BS_D3D11_EXPORT
  75. # else
  76. # define BS_D3D11_EXPORT __declspec(dllimport)
  77. # endif
  78. # endif
  79. #else
  80. # define BS_D3D11_EXPORT
  81. #endif
  82. }