Function create

Summary

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

(1) static SharedPtr create(ConstBufferSharedPtrRef pBuffer)

(2) static SharedPtr create()

Function overload

Synopsis

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

static SharedPtr create(ConstBufferSharedPtrRef pBuffer)

Description

No description yet.

Source

Lines 581-590 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 200 in Source/Falcor/Core/API/ResourceViews.h.

ConstantBufferView::SharedPtr ConstantBufferView::create(ConstBufferSharedPtrRef pBuffer)
{
    assert(pBuffer);
    D3D12_CONSTANT_BUFFER_VIEW_DESC desc = {};
    desc.BufferLocation = pBuffer->getGpuAddress();
    desc.SizeInBytes = (uint32_t)pBuffer->getSize();
    Resource::ApiHandle resHandle = pBuffer->getApiHandle();
    return SharedPtr(new ConstantBufferView(pBuffer, createCbvDescriptor(desc, resHandle)));
}

Synopsis

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

static SharedPtr create()

Description

No description yet.

Source

Lines 592-598 in Source/Falcor/Core/API/D3D12/D3D12ResourceViews.cpp. Line 201 in Source/Falcor/Core/API/ResourceViews.h.

ConstantBufferView::SharedPtr ConstantBufferView::create()
{
    // Create a null view.
    D3D12_CONSTANT_BUFFER_VIEW_DESC desc = {};
    return SharedPtr(new ConstantBufferView(std::weak_ptr<Resource>(), createCbvDescriptor(desc, nullptr)));
}





Add Discussion as Guest

Log in