BsD3D11RenderStateManager.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #include "BsD3D11RenderStateManager.h"
  2. #include "BsD3D11SamplerState.h"
  3. #include "BsD3D11DepthStencilState.h"
  4. #include "BsD3D11RasterizerState.h"
  5. #include "BsD3D11BlendState.h"
  6. namespace BansheeEngine
  7. {
  8. SamplerStatePtr D3D11RenderStateManager::createSamplerStateImpl() const
  9. {
  10. SamplerStatePtr samplerState = bs_core_ptr<D3D11SamplerState, PoolAlloc>(new (bs_alloc<D3D11SamplerState, PoolAlloc>()) D3D11SamplerState());
  11. return samplerState;
  12. }
  13. BlendStatePtr D3D11RenderStateManager::createBlendStateImpl() const
  14. {
  15. BlendStatePtr blendState = bs_core_ptr<D3D11BlendState, PoolAlloc>(new (bs_alloc<D3D11BlendState, PoolAlloc>()) D3D11BlendState());
  16. return blendState;
  17. }
  18. RasterizerStatePtr D3D11RenderStateManager::createRasterizerStateImpl() const
  19. {
  20. RasterizerStatePtr rasterizerState = bs_core_ptr<D3D11RasterizerState, PoolAlloc>(new (bs_alloc<D3D11RasterizerState, PoolAlloc>()) D3D11RasterizerState());
  21. return rasterizerState;
  22. }
  23. DepthStencilStatePtr D3D11RenderStateManager::createDepthStencilStateImpl() const
  24. {
  25. DepthStencilStatePtr depthStencilState = bs_core_ptr<D3D11DepthStencilState, PoolAlloc>(new (bs_alloc<D3D11DepthStencilState, PoolAlloc>()) D3D11DepthStencilState());
  26. return depthStencilState;
  27. }
  28. }