Function readTextureSubresource

Synopsis

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

std::vector< uint8_t > readTextureSubresource(const Texture *pTexture, uint32_t subresourceIndex)

Description

Read texture data synchronously. Calling this command will flush the pipeline and wait for the GPU to finish execution

Source

Lines 76-80 in Source/Falcor/Core/API/CopyContext.cpp. Line 126 in Source/Falcor/Core/API/CopyContext.h.

std::vector<uint8_t> CopyContext::readTextureSubresource(const Texture* pTexture, uint32_t subresourceIndex)
{
    CopyContext::ReadTextureTask::SharedPtr pTask = asyncReadTextureSubresource(pTexture, subresourceIndex);
    return pTask->getData();
}





Add Discussion as Guest

Log in to DocsForge