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:
committed by
Maximilian Kueffner
parent
244b00fa5c
commit
356f966d01
@@ -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();
|
||||
```
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user