CmDepthStencilBuffer.cpp 662 B

1234567891011121314151617181920212223242526272829303132
  1. #include "CmDepthStencilBuffer.h"
  2. #include "CmRenderTarget.h"
  3. namespace CamelotEngine
  4. {
  5. DepthStencilBuffer::DepthStencilBuffer(UINT32 bitDepth, UINT32 width, UINT32 height, UINT32 fsaa, const String &fsaaHint)
  6. : mBitDepth(bitDepth)
  7. , mWidth(width)
  8. , mHeight(height)
  9. , mFsaa(fsaa)
  10. , mFsaaHint(fsaaHint)
  11. {
  12. }
  13. DepthStencilBuffer::~DepthStencilBuffer()
  14. {
  15. }
  16. bool DepthStencilBuffer::isCompatible(RenderTarget *renderTarget) const
  17. {
  18. if( this->getWidth() >= renderTarget->getWidth() &&
  19. this->getHeight() >= renderTarget->getHeight() &&
  20. this->getFsaa() == renderTarget->getFSAA() )
  21. {
  22. return true;
  23. }
  24. return false;
  25. }
  26. }