Function updateTextureData

Synopsis

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

void updateTextureData(const Texture *pTexture, const void *pData)

Description

Update an entire texture

Source

Lines 146-155 in Source/Falcor/Core/API/CopyContext.cpp. Line 118 in Source/Falcor/Core/API/CopyContext.h.

void CopyContext::updateTextureData(const Texture* pTexture, const void* pData)
{
    mCommandsPending = true;
    uint32_t subresourceCount = pTexture->getArraySize() * pTexture->getMipCount();
    if (pTexture->getType() == Texture::Type::TextureCube)
    {
        subresourceCount *= 6;
    }
    updateTextureSubresources(pTexture, 0, subresourceCount, pData);
}





Add Discussion as Guest

Log in to DocsForge