summaryrefslogtreecommitdiff
path: root/app.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'app.hpp')
-rw-r--r--app.hpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/app.hpp b/app.hpp
index 9a660cf..a1fb911 100644
--- a/app.hpp
+++ b/app.hpp
@@ -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;
};