MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DrawBegin

Method DrawBegin

Source/Engine/GraphicsDevice/WebGPU/GPUDeviceWebGPU.cpp:206–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void GPUDataUploaderWebGPU::DrawBegin()
207{
208 // Free old buffers and recycle unused ones
209 uint64 frame = Engine::FrameCount;
210 for (int32 i = _entries.Count() - 1; i >= 0; i--)
211 {
212 auto& e = _entries[i];
213 if (frame - e.ActiveFrame > 100)
214 {
215 wgpuBufferRelease(e.Buffer);
216 PROFILE_MEM_DEC(GraphicsBuffers, e.Size);
217 _entries.RemoveAt(i);
218 }
219 }
220 _frame = frame;
221}
222
223void GPUDataUploaderWebGPU::ReleaseGPU()
224{

Callers

nothing calls this directly

Calls 5

New2DFunction · 0.85
New3DFunction · 0.85
NewCubeFunction · 0.85
CountMethod · 0.45
RemoveAtMethod · 0.45

Tested by

no test coverage detected