Game/src/main.cpp
// Readback the light buffers from the GPU buffers.

Readback the light buffers from the GPU buffers.
Readback the light buffers from the GPU buffers .
void ReadbackLightBufers()
{
    auto commandQueue = g_RenderDevice->GetGraphicsQueue();
    auto commandBuffer = commandQueue->GetCopyCommandBuffer();
    ReadbackPointLights( nullptr, commandBuffer );
    ReadbackSpotLights( nullptr, commandBuffer );
    ReadbackDirLights( nullptr, commandBuffer );
    auto fence = commandQueue->Submit( commandBuffer );
    fence->WaitFor();
    g_PointLightsReadbackBuffer->GetData( g_Config.PointLights.data() );
    g_SpotLightsReadbackBuffer->GetData( g_Config.SpotLights.data() );
    g_DirectionalLightsReadbackBuffer->GetData( g_Config.DirectionalLights.data() );
}
void ReadbackLightBufers ( ) { auto commandQueue = g_RenderDevice -> GetGraphicsQueue ( ) ; auto commandBuffer = commandQueue -> GetCopyCommandBuffer ( ) ; ReadbackPointLights ( nullptr , commandBuffer ) ; ReadbackSpotLights ( nullptr , commandBuffer ) ; ReadbackDirLights ( nullptr , commandBuffer ) ; auto fence = commandQueue -> Submit ( commandBuffer ) ; fence -> WaitFor ( ) ; g_PointLightsReadbackBuffer -> GetData ( g_Config . PointLights . data ( ) ) ; g_SpotLightsReadbackBuffer -> GetData ( g_Config . SpotLights . data ( ) ) ; g_DirectionalLightsReadbackBuffer -> GetData ( g_Config . DirectionalLights . data ( ) ) ; }
Readback the light buffers from the GPU buffers.
Readback the light buffers from the GPU buffers .