init wgpu + doc + err robustes

This commit is contained in:
jerome
2026-07-03 12:33:32 +02:00
parent f765c5fcc1
commit f66519eeab
11 changed files with 2691 additions and 8 deletions
+16
View File
@@ -0,0 +1,16 @@
# WSG - WGPU Simple Graphics Library
A simple WGPU wrapper to expose basic objects for drawing and manipulation: Meshes, Vertices, Indexes, UVs
| Component | Ownership | Role |
|-----------|-----------|------|
| Instance | wgpu | The entry point. It manages connections with graphics drivers (Vulkan, Metal, DX12). |
| Surface | wgpu | The link between wgpu and your window (winit). This is where rendering is displayed. |
| Adapter | wgpu | Represents your GPU (physical or software). |
| Device | wgpu | The engine's core. It creates buffers, textures, and pipelines. |
| Queue | wgpu | The queue. You send drawing commands for execution. |
| Context | Our Lib | A logical container. wgpu doesn't have a "Context" object; we create it to group these disparate objects and simplify your user API. |
Context (Lib) : Initializes the GPU, creates the surface, and holds the Device and Queue. It is static (created once at startup).
Renderer (Lib) : Uses the Device to create pipelines, manages your 500,000 vertices, and uses the Queue to send rendering instructions each frame. It is dynamic (it changes depending on what you want to display).