MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / getDepthStencilView

Method getDepthStencilView

Source/Falcor/Core/API/FBO.cpp:331–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331ref<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
350void Fbo::attachDepthStencilTarget(const ref<Texture>& pDepthStencil, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)
351{

Callers 2

clearFboMethod · 0.80

Calls 2

getDSVMethod · 0.80
createFunction · 0.70

Tested by

no test coverage detected