MCPcopy Create free account
hub / github.com/defold/defold / WebGPUClear

Function WebGPUClear

engine/graphics/src/webgpu/graphics_webgpu.cpp:1803–1812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1801}
1802
1803static void WebGPUClear(HContext _context, uint32_t flags, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha, float depth, uint32_t stencil)
1804{
1805 TRACE_CALL;
1806 WebGPUContext* context = (WebGPUContext*)_context;
1807 WebGPUEndRenderPass(context);
1808 const float clear_color[] = { red / 255.0f, green / 255.0f, blue / 255.0f, alpha / 255.0f };
1809 WebGPUBeginRenderPass(context, (flags & dmGraphics::BUFFER_TYPE_COLOR0_BIT) ? clear_color : 0,
1810 (flags & dmGraphics::BUFFER_TYPE_DEPTH_BIT) ? &depth : 0,
1811 (flags & dmGraphics::BUFFER_TYPE_STENCIL_BIT) ? &stencil : 0);
1812}
1813
1814static void WebGPUBeginFrame(HContext _context)
1815{

Callers

nothing calls this directly

Calls 2

WebGPUEndRenderPassFunction · 0.85
WebGPUBeginRenderPassFunction · 0.85

Tested by

no test coverage detected