SoftLK-lib/examples/performance
Captain4LK 20b94a32f9 Rework font system
* Fonts not loaded automatically anymore, load with SLK_draw_[DRAWTYPE]_load_font(path)
* Changed included font, because of unknown license/origin
* Included some more fonts
2020-07-28 20:09:59 +02:00
..
assets Remove SLK_config.h, update SLKIMAGE files, add SLK_core_set_visible 2020-06-24 16:51:36 +02:00
build_linux.sh Added layers 2020-04-19 22:15:50 +02:00
main.c Rework font system 2020-07-28 20:09:59 +02:00
README.md Add README and build instructions to every example 2020-07-26 11:15:53 +02:00

Performance

This example messures the performance of the rgb and palettized software renderer included in SoftLK. You can press r (rgb) and p(pal) to acess the two renderes and/or reset the timer.

On the top left you can see to numbers. The number on the left displays the average render time since the last reset, the right number shows how many sprites are beeing drawn. You can add more sprites by pressing/holding the space bar. In the top right corner the currently used renderer is beeing displayed.

screenshot

How to compile

If you are on linux and have gcc installed you can just use the provided shell script to compile this example, otherwise you can compile it like this (again, clang should work too):

gcc -O3 -o resize main.c ../../lib/libSLK.a -lm -lSDL2 -lGL  -Wall #Compile to executable
chmod +x ./resize #Only needed on unix(-like) systems