Commit Graph

18 Commits

Author SHA1 Message Date
9789e449c3 Rebuild from scratch with a new strategy using compute shaders and SDF. 2026-05-06 16:27:41 +02:00
7e3da1c424 refactor: eliminate globals, add pen tool + edit mode, frustum culling
Remove all file-scope mutable state so the codebase compiles cleanly
as a single translation unit. State moved into structs owned by
userdata_t:

- group_index_ctx_t replaces g_group_by_id/g_group_by_id_cap
- shape_pool_ctx_t replaces g_shape_pool_dirty/g_shape_data_dirty
  and g_shape_groups/g_shape_groups_count
- panel_log_ctx_t wired through all subsystems explicitly
- pipeline_ctx_t owns render pipeline handles
- overlay_upload_state_t (per-buffer flags) replaces single bool

New features piggybacking on the refactor:

- Pen tool: click-to-place anchors, Catmull-Rom preview, finalize
  into Bezier shapes with control points
- Edit mode: anchor/handle hit testing, dragging, pre-drag undo
  snapshots, dedicated GPU buffers for edit overlays
- Frustum culling: spatial-grid-based viewport cull in draw_shapes
  with linear-scan fallback for oversized viewports
- Log dedup: FNV-1a 64-bit hash to skip duplicate messages
- Buffer shrink: halve draw buffers after 60 frames of low usage
- Shape geometry hashing for instanced-draw vertex-buffer grouping
- Group member_indices arrays with O(n) rebuild
- Log ring expanded 64→256 entries, added log_filter

Debug build: added --profiling-funcs and -sASSERTIONS flags.
2026-05-03 00:38:45 +02:00
c4d657043c Add copy/paste, rewrite rendering pipeline with instanced draw calls and add a lot of caching to minimize overhead on huge edits. 2026-05-01 00:10:19 +02:00
e71641c094 Add a geometry pool, shape hierarchy, addittion and deletion. 2026-04-30 17:55:46 +02:00
9ce6e4accd Reorganized the code structure, fix a lot of issues. 2026-04-28 21:05:43 +02:00
81616f8a5d History, spatial grid and optimizations 2026-04-28 19:02:00 +02:00
5881a7dafc Add shapes and basic selective actions 2026-04-27 18:26:02 +02:00
21476a3b95 Makefile working with imgui 2026-04-27 13:41:50 +02:00
0fed24b3c4 Ignore vscode folder 2025-06-23 18:48:05 +02:00
Clément Pons
24c9cd2fc7 Add a makefile, change imgui with nuklear and add file dropping and loading 2025-06-23 17:48:17 +02:00
e8516827e1 Automatic texture batching + sprite rendering 2025-06-23 00:15:01 +02:00
Clément Pons
b02b2b02d5 Testing WSGL directly 2025-05-07 17:32:36 +02:00
Clément Pons
0059d8fc3b No more WebGPU errors 2025-05-01 16:13:27 +02:00
Clément Pons
ceaa78ea1a Testing without sokol_gp.h 2025-03-27 18:03:02 +01:00
Clément Pons
7798c762ae Testing + First event listener 2025-03-26 17:38:37 +01:00
Clément Pons
5f74472055 Add flecs 2025-03-25 17:18:06 +01:00
Clément Pons
6692bcf7ad Setup for 2D 2025-03-25 16:38:13 +01:00
Clément Pons
79f8d6d4dc Initial boilerplate 2025-03-25 15:10:19 +01:00