MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / onFrameRender

Method onFrameRender

Source/Samples/CudaInterop/CudaInterop.cpp:77–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void CudaInterop::onFrameRender(RenderContext* pRenderContext, const ref<Fbo>& pTargetFbo)
78{
79 const Falcor::float4 clearColor(0.38f, 0.52f, 0.10f, 1);
80 pRenderContext->clearFbo(pTargetFbo.get(), clearColor, 1.0f, 0, FboAttachmentType::All);
81
82 // Call the CUDA kernel
83 uint32_t format =
84 (getFormatType(mpInputTex->getFormat()) == FormatType::Float) ? cudaChannelFormatKindFloat : cudaChannelFormatKindUnsigned;
85 launchCopySurface(mInputSurf, mOutputSurf, mWidth, mHeight, format);
86 pRenderContext->blit(mpOutputTex->getSRV(), pTargetFbo->getRenderTargetView(0));
87}
88
89int runMain(int argc, char** argv)
90{

Callers

nothing calls this directly

Calls 7

getFormatTypeFunction · 0.85
clearFboMethod · 0.80
getFormatMethod · 0.80
blitMethod · 0.80
getRenderTargetViewMethod · 0.80
getMethod · 0.45
getSRVMethod · 0.45

Tested by

no test coverage detected