Function present

Synopsis

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

void present()

Description

Present the back-buffer to the window

Source

Lines 195-204 in Source/Falcor/Core/API/Device.cpp. Line 130 in Source/Falcor/Core/API/Device.h.

void Device::present()
{
    mpRenderContext->resourceBarrier(mpSwapChainFbos[mCurrentBackBufferIndex]->getColorTexture(0).get(), Resource::State::Present);
    mpRenderContext->flush();
    apiPresent();
    mpFrameFence->gpuSignal(mpRenderContext->getLowLevelData()->getCommandQueue());
    if (mpFrameFence->getCpuValue() >= kSwapChainBuffersCount) mpFrameFence->syncCpu(mpFrameFence->getCpuValue() - kSwapChainBuffersCount);
    executeDeferredReleases();
    mFrameID++;
}





Add Discussion as Guest

Log in