| 329 | } |
| 330 | |
| 331 | ref<DepthStencilView> Fbo::getDepthStencilView() const |
| 332 | { |
| 333 | if (mDepthStencil.pTexture) |
| 334 | { |
| 335 | return mDepthStencil.pTexture->getDSV(mDepthStencil.mipLevel, mDepthStencil.firstArraySlice, mDepthStencil.arraySize); |
| 336 | } |
| 337 | else |
| 338 | { |
| 339 | if (!mDepthStencil.pNullView) |
| 340 | { |
| 341 | // TODO: mDepthStencil doesn't contain enough information to fully determine the view dimension. Assume 2D for now. |
| 342 | auto dimension = |
| 343 | mDepthStencil.arraySize > 1 ? DepthStencilView::Dimension::Texture2DArray : DepthStencilView::Dimension::Texture2D; |
| 344 | mDepthStencil.pNullView = DepthStencilView::create(mpDevice, dimension); |
| 345 | } |
| 346 | return static_ref_cast<DepthStencilView>(mDepthStencil.pNullView); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | void Fbo::attachDepthStencilTarget(const ref<Texture>& pDepthStencil, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize) |
| 351 | { |
no test coverage detected