BsD3D11Prerequisites.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 D3D11Driver;
  30. class D3D11DriverList;
  31. class D3D11VideoMode;
  32. class D3D11VideoModeList;
  33. class D3D11GpuProgramManager;
  34. class D3D11IndexBuffer;
  35. class D3D11HLSLProgramFactory;
  36. class D3D11Device;
  37. class D3D11HardwareBuffer;
  38. class D3D11GpuVertexProgram;
  39. class D3D11GpuFragmentProgram;
  40. class D3D11GpuGeometryProgram;
  41. class D3D11GpuHullProgram;
  42. class D3D11GpuDomainProgram;
  43. class D3D11DepthStencilStateCore;
  44. class D3D11InputLayoutManager;
  45. class D3D11GpuBufferCore;
  46. class D3D11RenderUtility;
  47. class D3D11GpuProgramCore;
  48. class D3D11TextureView;
  49. class D3D11GpuBufferView;
  50. /** DirectX 11 specific types to track resource statistics for. */
  51. enum D3D11RenderStatResourceType
  52. {
  53. RenderStatObject_DepthStencilState = 100,
  54. RenderStatObject_RasterizerState,
  55. RenderStatObject_BlendState,
  56. RenderStatObject_SamplerState,
  57. RenderStatObject_InputLayout,
  58. RenderStatObject_ResourceView,
  59. RenderStatObject_SwapChain
  60. };
  61. typedef Vector<char*> HLSLMicroCode;
  62. #if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(BS_STATIC_LIB)
  63. # ifdef BS_RSD3D11_EXPORTS
  64. # define BS_D3D11_EXPORT __declspec(dllexport)
  65. # else
  66. # if defined( __MINGW32__ )
  67. # define BS_D3D11_EXPORT
  68. # else
  69. # define BS_D3D11_EXPORT __declspec(dllimport)
  70. # endif
  71. # endif
  72. #else
  73. # define BS_D3D11_EXPORT
  74. #endif
  75. }