Function getSRV

Summary

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

(1) ShaderResourceView::SharedPtr getSRV(uint32_t firstElement, uint32_t elementCount=kMaxPossible)

(2) ShaderResourceView::SharedPtr getSRV() override

Function overload

Synopsis

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

ShaderResourceView::SharedPtr getSRV(uint32_t firstElement, uint32_t elementCount=kMaxPossible)

Description

Get a shader-resource view.

Parameters:

[ in ] firstElement - The first element of the view. For raw buffers, an element is a single float

[ in ] elementCount - The number of elements to bind

Source

Lines 203-211 in Source/Falcor/Core/API/Buffer.cpp. Line 179 in Source/Falcor/Core/API/Buffer.h.

ShaderResourceView::SharedPtr Buffer::getSRV(uint32_t firstElement, uint32_t elementCount)
{
    auto createFunc = [](Buffer* pBuffer, uint32_t firstElement, uint32_t elementCount)
    {
        return ShaderResourceView::create(std::static_pointer_cast<Buffer>(pBuffer->shared_from_this()), firstElement, elementCount);
    };
    return findViewCommon<ShaderResourceView>(this, firstElement, elementCount, mSrvs, createFunc);
}

Synopsis

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

ShaderResourceView::SharedPtr getSRV() override

Description

Get a shader-resource view for the entire resource

Source

Lines 213-216 in Source/Falcor/Core/API/Buffer.cpp. Line 189 in Source/Falcor/Core/API/Buffer.h.

ShaderResourceView::SharedPtr Buffer::getSRV()
{
    return getSRV(0);
}





Add Discussion as Guest

Log in to DocsForge