Steppable 0.0.1
A CAS project written from scratch in C++
Loading...
Searching...
No Matches
imgui_impl_wgpu.h
1// dear imgui: Renderer for WebGPU
2// This needs to be used along with a Platform Binding (e.g. GLFW)
3// (Please note that WebGPU is currently experimental, will not run on non-beta browsers, and may break.)
4
5// Implemented features:
6// [X] Renderer: User texture binding. Use 'WGPUTextureView' as ImTextureID. Read the FAQ about ImTextureID!
7// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
8// Missing features:
9// [ ] Renderer: Multi-viewport support (multiple windows). Not meaningful on the web.
10
11// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
12// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
13// Learn about Dear ImGui:
14// - FAQ https://dearimgui.com/faq
15// - Getting Started https://dearimgui.com/getting-started
16// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
17// - Introduction, links and more at the top of imgui.cpp
18
19#pragma once
20#include "imgui.h" // IMGUI_IMPL_API
21#ifndef IMGUI_DISABLE
22
23#include <webgpu/webgpu.h>
24
25// Initialization data, for ImGui_ImplWGPU_Init()
27{
28 WGPUDevice Device;
30 WGPUTextureFormat RenderTargetFormat = WGPUTextureFormat_Undefined;
31 WGPUTextureFormat DepthStencilFormat = WGPUTextureFormat_Undefined;
32 WGPUMultisampleState PipelineMultisampleState = {};
33
35 {
37 PipelineMultisampleState.mask = UINT32_MAX;
38 PipelineMultisampleState.alphaToCoverageEnabled = false;
39 }
40};
41
42IMGUI_IMPL_API bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info);
43IMGUI_IMPL_API void ImGui_ImplWGPU_Shutdown();
44IMGUI_IMPL_API void ImGui_ImplWGPU_NewFrame();
45IMGUI_IMPL_API void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder pass_encoder);
46
47// Use if you want to reset your rendering device without losing Dear ImGui state.
48IMGUI_IMPL_API void ImGui_ImplWGPU_InvalidateDeviceObjects();
49IMGUI_IMPL_API bool ImGui_ImplWGPU_CreateDeviceObjects();
50
51#endif // #ifndef IMGUI_DISABLE
Definition imgui.h:3269
Definition imgui_impl_wgpu.h:27
WGPUTextureFormat DepthStencilFormat
Definition imgui_impl_wgpu.h:31
WGPUMultisampleState PipelineMultisampleState
Definition imgui_impl_wgpu.h:32
int NumFramesInFlight
Definition imgui_impl_wgpu.h:29
ImGui_ImplWGPU_InitInfo()
Definition imgui_impl_wgpu.h:34
WGPUTextureFormat RenderTargetFormat
Definition imgui_impl_wgpu.h:30
WGPUDevice Device
Definition imgui_impl_wgpu.h:28
Untitled