Function create

Summary

#include <Source/Falcor/Core/API/ResourceViews.h>

(1) static SharedPtr create(ConstTextureSharedPtrRef pTexture, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)

(2) static SharedPtr create(Dimension dimension)

Function overload

Synopsis

#include <Source/Falcor/Core/API/ResourceViews.h>

static SharedPtr create(ConstTextureSharedPtrRef pTexture, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)

Description

No description yet.

Source

Lines 478-485 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 148 in Source/Falcor/Core/API/ResourceViews.h.

DepthStencilView::SharedPtr DepthStencilView::create(ConstTextureSharedPtrRef pTexture, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)
{
    assert(pTexture);
    D3D12_DEPTH_STENCIL_VIEW_DESC desc = createDsvDesc(pTexture.get(), mipLevel, firstArraySlice, arraySize);
    Resource::ApiHandle resHandle = pTexture->getApiHandle();
    return SharedPtr(new DepthStencilView(pTexture, createDsvDescriptor(desc, resHandle), mipLevel, firstArraySlice, arraySize));
}

Synopsis

#include <Source/Falcor/Core/API/ResourceViews.h>

static SharedPtr create(Dimension dimension)

Description

No description yet.

Source

Lines 487-495 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 149 in Source/Falcor/Core/API/ResourceViews.h.

DepthStencilView::SharedPtr DepthStencilView::create(Dimension dimension)
{
    // Create a null view of the specified dimension.
    D3D12_DEPTH_STENCIL_VIEW_DESC desc = {};
    desc.Format = DXGI_FORMAT_D32_FLOAT;
    desc.ViewDimension = getViewDimension<decltype(desc.ViewDimension)>(dimension);
    return SharedPtr(new DepthStencilView(std::weak_ptr<Resource>(), createDsvDescriptor(desc, nullptr), 0, 0, 1));
}





Add Discussion as Guest

Log in