mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Examples: Reworked setup of clear color to be compatible with transparent values. (#2693, #2764, #2766, #2873, #3447, #3813, #3816)
This commit is contained in:
parent
bda12e5fdd
commit
6a161b8789
20 changed files with 36 additions and 23 deletions
|
|
@ -205,7 +205,7 @@ static void main_loop(void* window)
|
|||
WGPURenderPassColorAttachmentDescriptor color_attachments = {};
|
||||
color_attachments.loadOp = WGPULoadOp_Clear;
|
||||
color_attachments.storeOp = WGPUStoreOp_Store;
|
||||
color_attachments.clearColor = { clear_color.x, clear_color.y, clear_color.z, clear_color.w };
|
||||
color_attachments.clearColor = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w };
|
||||
color_attachments.attachment = wgpuSwapChainGetCurrentTextureView(wgpu_swap_chain);
|
||||
WGPURenderPassDescriptor render_pass_desc = {};
|
||||
render_pass_desc.colorAttachmentCount = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue