Enhance examples (#17)

* enhance examples

* doc enhancement

* mv pool to stack

* missing ; and doc update

fix readme example image link
This commit is contained in:
m-aXimilian
2025-10-11 17:23:58 +02:00
committed by Maximilian Kueffner
parent 244b00fa5c
commit 356f966d01
14 changed files with 172 additions and 36 deletions
+1
View File
@@ -9,6 +9,7 @@ INPUT = @PROJECT_SOURCE_DIR@/lib/app \
@PROJECT_SOURCE_DIR@/lib/utilities \
@PROJECT_SOURCE_DIR@/lib/rendering \
@PROJECT_SOURCE_DIR@/lib/resources
IMAGE_PATH = @PROJECT_SOURCE_DIR@/doc/figures
DOXYFILE_ENCODING = UTF-8
GENERATE_LATEX = NO
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

+25
View File
@@ -52,5 +52,30 @@ If you want to specify compiler settings and options which are not defined in a
cmake -B build -S .
cmake --build build
# Usage
The [examples](https://github.com/m-aXimilian/pixelarium/tree/fd400bf545ade029696c21119a50cf4bb67ffbac/examples) directory aims to showcase a few usage examples of this project.
All there is to do in order to get an initial window on screen is to create an instance of [`AppGLFW`](https://github.com/m-aXimilian/pixelarium/blob/fd400bf545ade029696c21119a50cf4bb67ffbac/lib/app/AppGLFW.hpp) (or one of its child classes) and start it.
```cpp
unique_ptr<ILog> logger = make_unique<SpdLogger>("logfile.log", "loggername");
ImageResourcePool image_pool;
auto app {DefaultApp(*logger, image_pool)};
app.Start();
```
![Default App Screenshot](default-app.png)
## simple
This is the most straight-forward usage of Pixelarium. It simply instantiates a [`DefaultApp`](https://github.com/m-aXimilian/pixelarium/blob/fd400bf545ade029696c21119a50cf4bb67ffbac/lib/app/DefaultApp.hpp) and runs it.
## custom_0
This is meant to showcase that [`DefaultApp`]((https://github.com/m-aXimilian/pixelarium/blob/fd400bf545ade029696c21119a50cf4bb67ffbac/lib/app/DefaultApp.hpp)) ([`AppGLFW`](https://github.com/m-aXimilian/pixelarium/blob/fd400bf545ade029696c21119a50cf4bb67ffbac/lib/app/AppGLFW.hpp) as well) can be customized via inheritance.
+1
View File
@@ -2,6 +2,7 @@
| Version | Description |
|:-------:|:------------------------------------------------------------------------------------------------------------|
| 0.0.9 | Improve documentation, add example for `DefaultApp` override semantics |
| 0.0.8 | Init example projects |
| 0.0.7 | Refactors image gallery logic from `DefaultApp` into a separate module |
| 0.0.6 | Added documentation-only option `PIXELARIUM_BUILD_DOCS_ONLY`, libCZI upgrade to main branch CI improvements |