MCPcopy Create free account
hub / github.com/MethanePowered/MethaneKit / RandomizeFrameData

Method RandomizeFrameData

Apps/08-ConsoleCompute/ConsoleComputeApp.cpp:271–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void ConsoleComputeApp::RandomizeFrameData()
272{
273 META_FUNCTION_TASK();
274
275 // Randomize initial game state
276 m_frame_data = rhi::SubResource(GetRandomFrameData(m_random_engine, GetFieldSize(), GetInitialCellsRatio()));
277
278 // Set frame texture data
279 m_frame_texture.SetData(m_compute_context.GetComputeCommandKit().GetQueue(), { m_frame_data });
280}
281
282} // namespace Methane::Tutorials
283

Callers

nothing calls this directly

Calls 5

SubResourceClass · 0.85
GetRandomFrameDataFunction · 0.85
GetQueueMethod · 0.80
SetDataMethod · 0.45
GetComputeCommandKitMethod · 0.45

Tested by

no test coverage detected