This is an experiment and a try to create a base for Rendering and Drawing of Objects like Rectangle or Text in Nim.
The idea is to use Group Rendering for areas on a screen to reduce rendering and upload to the GPU.
There is no roadmap and no plan for development. It is a learning project to understand the complexity of an Retained UI Framework.
- Use only primitive GPU-Objects (traingles) for Rectangle, Circle
- Text/Fonts rendering (as Texture?) - Max texturebuffer GL=32, GLES=16 for one upload to GPU
- Transfer as much as possible from CPU to GPU
- Low CPU and GPU power consuming on runtime
- Rectangle, Circle
- Text/Fonsts
- Small size of static compiled binary
- Antialiazing of RenderObjects without hardware antialiazing (MSAA = MultiSampling Anti-Aliasing)
- Reduce single Uploads from CPU to GPU. (Group Rendering/Drawing)
- Simple and readable design and coding (no templates, no macros, no DSL)
- Rendering of areas with caching
- Event Loop on main thread / Rendering on separate thread
- Stress test with many objects
- Comparison with other lightweight vector graphics engines
Some ideas come from an earlier experiment about "Group Rendering": fyne-io/fyne#3412 (comment)
If the performance tests are successful Tier 2 (in another package) could follow.
- Imperative design
- Events with callbacks
- Simple layout system. (only columns and rows)
- Bare minimum Widgets/Controls
- Check, if "Relays" fit for Retained-Mode (https://github.com/nim-lang/uirelays)
- ...
src/main.nim is an example or a test file.
- Resizing window re-draws the screen (no re-rendering). See
src/gl.nimproc renderTree(...) - Mouse-Click prints (
echo) the coordinates
Windy
nimble install https://github.com/treeform/windy
nim.exe c -d:WindyGl -d:release .\src\main.nim
GLFW
nimble install https://github.com/RowDaBoat/nglfw
nim.exe c -d:GlfwGL -d:release .\src\main.nim
