25 Commits

Author SHA1 Message Date
Bob Polis
3db2099635 Setting image no longer resizes window
It caused bugs in more general cases.
You should resize the window from app code when necessary.
2021-02-01 10:50:40 +01:00
Bob Polis
f1e82f6126 Changed callbacks to std::function
Now you can also use lambdas with captured values.
2021-02-01 00:38:55 +01:00
Bob Polis
502664615a added delay to run loop in order to cap to a given fps 2020-11-13 17:18:16 +01:00
Bob Polis
32ac8b4e0f refactored event handling; added _dirty flag to only update when dirty 2020-11-13 16:54:49 +01:00
Bob Polis
6202c7dba7 added fps; added time measurement of run loop; extra sleep commented out because of buggy update behaviour when used 2020-11-11 17:37:23 +01:00
Bob Polis
97c837f9e9 added standard unit test support 2020-11-11 17:25:24 +01:00
Bob Polis
24bed16090 changed literal to named constant 2020-11-11 17:22:45 +01:00
Bob Polis
4f9b66dc79 replaced Makefile with new one for changed project hierarchy 2020-11-11 17:21:59 +01:00
Bob Polis
b9e76c5286 moved all sources into src directory 2020-11-11 17:20:42 +01:00
Bob Polis
50b045e173 changed default window size to 1600x900 2020-10-26 23:15:50 +01:00
Bob Polis
039b7ccec0 changed default window size to 1280x720 2020-10-26 23:13:39 +01:00
Bob Polis
6097614905 added width() and height() getters 2020-10-25 20:31:19 +01:00
Bob Polis
05cf3ba0e2 moved window updating and runloop actions after event polling 2020-10-25 20:30:57 +01:00
Bob Polis
deddc2bbea added run loop actions 2020-10-25 19:03:34 +01:00
4e12340507 changed event handling order to have custom handlers fire first 2020-10-24 23:15:21 +02:00
Bob Polis
ec465820e8 added ImageLock RAII class for SDL Surface locking 2020-10-24 18:02:43 +02:00
Bob Polis
582de4df22 added getter for the texture 2020-10-24 18:02:12 +02:00
Bob Polis
84a196ab1a added constructor for external surfaces 2020-10-24 18:01:44 +02:00
Bob Polis
027b9ba84a changed polling for events to blocking call 2020-10-24 15:58:58 +02:00
Bob Polis
b67f68cd6c changed get_window() to window() for consistency 2020-10-24 15:58:09 +02:00
Bob Polis
7382120a0b added Image class to wrap SDL_Surface; changed Window to use Images 2020-10-24 15:13:13 +02:00
Bob Polis
0c4f5456a4 added Application; implemented event handling 2020-10-24 13:02:18 +02:00
Bob Polis
c6e6333f9a added namespaces 2020-10-23 13:55:57 +02:00
Bob Polis
3de586a516 added .gitignore for library header 2020-10-23 12:45:42 +02:00
Bob Polis
b01871799a first commit 2020-10-23 12:43:47 +02:00