BsD3D11RenderStateManager.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #include "BsD3D11RenderStateManager.h"
  5. #include "BsD3D11SamplerState.h"
  6. #include "BsD3D11DepthStencilState.h"
  7. #include "BsD3D11RasterizerState.h"
  8. #include "BsD3D11BlendState.h"
  9. namespace BansheeEngine
  10. {
  11. SamplerStatePtr D3D11RenderStateManager::createSamplerStateImpl() const
  12. {
  13. SamplerStatePtr samplerState = bs_core_ptr<D3D11SamplerState, PoolAlloc>(new (bs_alloc<D3D11SamplerState, PoolAlloc>()) D3D11SamplerState());
  14. return samplerState;
  15. }
  16. BlendStatePtr D3D11RenderStateManager::createBlendStateImpl() const
  17. {
  18. BlendStatePtr blendState = bs_core_ptr<D3D11BlendState, PoolAlloc>(new (bs_alloc<D3D11BlendState, PoolAlloc>()) D3D11BlendState());
  19. return blendState;
  20. }
  21. RasterizerStatePtr D3D11RenderStateManager::createRasterizerStateImpl() const
  22. {
  23. RasterizerStatePtr rasterizerState = bs_core_ptr<D3D11RasterizerState, PoolAlloc>(new (bs_alloc<D3D11RasterizerState, PoolAlloc>()) D3D11RasterizerState());
  24. return rasterizerState;
  25. }
  26. DepthStencilStatePtr D3D11RenderStateManager::createDepthStencilStateImpl() const
  27. {
  28. DepthStencilStatePtr depthStencilState = bs_core_ptr<D3D11DepthStencilState, PoolAlloc>(new (bs_alloc<D3D11DepthStencilState, PoolAlloc>()) D3D11DepthStencilState());
  29. return depthStencilState;
  30. }
  31. }