mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Backends: WebGPU: added ImGui_ImplWGPU_InitInfo::PipelineMultisampleState. (#7240)
This commit is contained in:
parent
831d42c1ab
commit
5fc0a361b2
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
// CHANGELOG
|
// CHANGELOG
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
// (minor and older changes stripped away, please see git history for details)
|
||||||
|
// 2024-01-22: Added configurable PipelineMultisampleState struct. (#7240)
|
||||||
// 2024-01-22: (Breaking) ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure instead of variety of parameters, allowing for easier further changes.
|
// 2024-01-22: (Breaking) ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure instead of variety of parameters, allowing for easier further changes.
|
||||||
// 2024-01-17: Explicitly fill all of WGPUDepthStencilState since standard removed defaults.
|
// 2024-01-17: Explicitly fill all of WGPUDepthStencilState since standard removed defaults.
|
||||||
// 2023-07-13: Use WGPUShaderModuleWGSLDescriptor's code instead of source. use WGPUMipmapFilterMode_Linear instead of WGPUFilterMode_Linear. (#6602)
|
// 2023-07-13: Use WGPUShaderModuleWGSLDescriptor's code instead of source. use WGPUMipmapFilterMode_Linear instead of WGPUFilterMode_Linear. (#6602)
|
||||||
@ -568,9 +569,7 @@ bool ImGui_ImplWGPU_CreateDeviceObjects()
|
|||||||
graphics_pipeline_desc.primitive.stripIndexFormat = WGPUIndexFormat_Undefined;
|
graphics_pipeline_desc.primitive.stripIndexFormat = WGPUIndexFormat_Undefined;
|
||||||
graphics_pipeline_desc.primitive.frontFace = WGPUFrontFace_CW;
|
graphics_pipeline_desc.primitive.frontFace = WGPUFrontFace_CW;
|
||||||
graphics_pipeline_desc.primitive.cullMode = WGPUCullMode_None;
|
graphics_pipeline_desc.primitive.cullMode = WGPUCullMode_None;
|
||||||
graphics_pipeline_desc.multisample.count = 1;
|
graphics_pipeline_desc.multisample = bd->initInfo.PipelineMultisampleState;
|
||||||
graphics_pipeline_desc.multisample.mask = UINT_MAX;
|
|
||||||
graphics_pipeline_desc.multisample.alphaToCoverageEnabled = false;
|
|
||||||
|
|
||||||
// Bind group layouts
|
// Bind group layouts
|
||||||
WGPUBindGroupLayoutEntry common_bg_layout_entries[2] = {};
|
WGPUBindGroupLayoutEntry common_bg_layout_entries[2] = {};
|
||||||
|
@ -27,6 +27,14 @@ struct ImGui_ImplWGPU_InitInfo
|
|||||||
int NumFramesInFlight = 3;
|
int NumFramesInFlight = 3;
|
||||||
WGPUTextureFormat RenderTargetFormat = WGPUTextureFormat_Undefined;
|
WGPUTextureFormat RenderTargetFormat = WGPUTextureFormat_Undefined;
|
||||||
WGPUTextureFormat DepthStencilFormat = WGPUTextureFormat_Undefined;
|
WGPUTextureFormat DepthStencilFormat = WGPUTextureFormat_Undefined;
|
||||||
|
WGPUMultisampleState PipelineMultisampleState = {};
|
||||||
|
|
||||||
|
ImGui_ImplWGPU_InitInfo()
|
||||||
|
{
|
||||||
|
PipelineMultisampleState.count = 1;
|
||||||
|
PipelineMultisampleState.mask = -1u;
|
||||||
|
PipelineMultisampleState.alphaToCoverageEnabled = false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
IMGUI_IMPL_API bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info);
|
IMGUI_IMPL_API bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user