diff options
Diffstat (limited to 'app.hpp')
-rw-r--r-- | app.hpp | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -112,18 +112,7 @@ struct App { uint64_t begin_t, end_t; App_Internal* internal; - template <typename T> - static T* create(const char* name) { - Arena* arena; - T* app = (T*)alloc(sizeof(T), arena); - app = new(app) T(); - app->arena = arena; - app->running = 0; - app->init(name); - return app; - } - static void* alloc(int size, Arena*& arena); - void init(const char* name); + void init(const char* name, Arena* a); void destroy(); void begin(); @@ -140,6 +129,9 @@ struct App { void get_vk_exts(const char** exts, int& count); + virtual void on_init() = 0; + virtual void on_update() = 0; + virtual void on_destroy() = 0; virtual void on_resize() = 0; }; |