SoftLK-lib/examples/performance
2020-08-04 09:41:18 +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 Update build scripts and makefile to follow better practices. 2020-08-04 09:41:18 +02:00
main.c Rework font system 2020-07-28 20:09:59 +02:00
README.md Update build scripts and makefile to follow better practices. 2020-08-04 09:41:18 +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 (the build_linux.sh script also works for FreeBSD), otherwise you can compile it like this (again, clang should work too):

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