CmDepthStencilState.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "CmDepthStencilState.h"
  2. #include "CmRenderStateManager.h"
  3. #include "CmRenderSystem.h"
  4. #include "CmDepthStencilStateRTTI.h"
  5. #include "CmException.h"
  6. namespace CamelotEngine
  7. {
  8. void DepthStencilState::initialize(const DEPTH_STENCIL_STATE_DESC& desc)
  9. {
  10. mData = desc;
  11. Resource::initialize();
  12. }
  13. const DepthStencilStatePtr& DepthStencilState::getDefault()
  14. {
  15. return RenderStateManager::instance().getDefaultDepthStencilState();
  16. }
  17. DepthStencilStatePtr DepthStencilState::create(const DEPTH_STENCIL_STATE_DESC& desc)
  18. {
  19. return RenderStateManager::instance().createDepthStencilState(desc);
  20. }
  21. /************************************************************************/
  22. /* RTTI */
  23. /************************************************************************/
  24. RTTITypeBase* DepthStencilState::getRTTIStatic()
  25. {
  26. return DepthStencilStateRTTI::instance();
  27. }
  28. RTTITypeBase* DepthStencilState::getRTTI() const
  29. {
  30. return DepthStencilState::getRTTIStatic();
  31. }
  32. }