Closed andreamancuso closed 4 months ago
The changes primarily update the dear-imgui
package to enhance texture handling and WebGPU integration, adjust include paths, and introduce new widgets. Significant updates include modifications to include paths, the addition of new setup and texture functions, and the introduction of the Map
widget. These enhancements improve the package's overall functionality and extend its capabilities for managing textures and rendering complex widgets.
Files/Paths | Change Summary |
---|---|
.vscode/c_cpp_properties.json | Updated include paths and defines for different configurations. |
...imgui/assets/.gitignore | Added a rule to ignore all PNG files. |
...imgui/cpp/CMakeLists.txt | Added Stb package, updated LINK_FLAGS for WebGL. |
...imgui/cpp/deps/wasm-glfw3-boilerplate | Changed the subproject commit hash. |
...imgui/cpp/imguiview.h | Updated font file paths and initialized m_device in SetUp method. |
...imgui/cpp/main.cpp | Introduced setUpTextures() method in WasmRunner class. |
...imgui/cpp/reactimgui.cpp | Replaced SetUpObservables with SetUp and SetUpTextures methods, added Map widget. |
...imgui/cpp/reactimgui.h | Added m_textures member, modified SetUp method and renamed SetUpObservables . |
...imgui/cpp/shared.cpp | Added web GPU-related headers, image loading using STB_image, and texture loading functions. |
...imgui/cpp/shared.h | Defined new Texture struct and LoadTextureFromFile function using WebGPU. |
...imgui/cpp/vcpkg.json | Added "stb" to the list of dependencies. |
...imgui/cpp/widget.cpp | Updated Map::Render function for mouse dragging and element clipping within the map. |
...imgui/cpp/widget.h | Introduced Map class with new members and methods. |
...imgui/ts/src/lib/components/ImGuiDemo/... | Added <ReactImgui.Map> component within the ImGuiDemo component. |
...imgui/ts/src/lib/components/ReactImgui/... | Introduced MapComponent functional component in Map.tsx . |
...imgui/ts/src/lib/components/ReactImgui/... | Added Map component to the list of exported components. |
...imgui/ts/src/lib/components/ReactImgui/... | Added new type Map to WidgetPropsMap export in types.ts . |
...imgui/cpp/widget.h | Updated makeWidget methods with new parameter names and conditions for JSON object properties. |
sequenceDiagram
participant WasmRunner
participant ReactImgui
participant Texture
participant WebGPU
WasmRunner->>ReactImgui: setUpTextures()
ReactImgui->>WebGPU: Initialize WebGPU Device
ReactImgui->>Texture: Load textures using STB_image
Texture-->>ReactImgui: Return loaded texture
ReactImgui-->>WasmRunner: Textures setup completed
ReactImgui->>ReactImgui: Render Map widget
In the world of code so bright, Textures bloom with pixels' light, Widgets dancing, maps in view, WebGPU and STB too. Paths aligned, configs refined, Dear ImGui's grand design. 🌟✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I'm using a static PNG image, loaded into a WGPUTexture. Very, very rudimentary POC.
Summary by CodeRabbit
New Features
Map
component for rendering interactive maps.ImGuiDemo
with a new "fake map" window.setUpTextures
method toWasmRunner
.Bug Fixes
Refactor
ReactImgui
to separate setup and texture initialization.makeWidget
methods with enhanced parameter handling.Chores
stb
library as a dependency for image loading.