summaryrefslogtreecommitdiff
path: root/themes/src/spring
diff options
context:
space:
mode:
Diffstat (limited to 'themes/src/spring')
-rw-r--r--themes/src/spring/SpringTheme.cpp10
-rw-r--r--themes/src/spring/SpringTheme.hpp8
2 files changed, 16 insertions, 2 deletions
diff --git a/themes/src/spring/SpringTheme.cpp b/themes/src/spring/SpringTheme.cpp
index 39b6bad..e39c138 100644
--- a/themes/src/spring/SpringTheme.cpp
+++ b/themes/src/spring/SpringTheme.cpp
@@ -37,6 +37,16 @@ inline void on_shaders_loader(ShaderFetchResult* result) {
fetch_bunny(theme);
}
+SpringTheme::SpringTheme(WebglContext* context)
+{
+ load(context);
+}
+
+SpringTheme::~SpringTheme()
+{
+ unload();
+}
+
void SpringTheme::load(WebglContext* context) {
state = SpringThemeState::Loading;
renderer.context = context;
diff --git a/themes/src/spring/SpringTheme.hpp b/themes/src/spring/SpringTheme.hpp
index 0866921..64f9cb5 100644
--- a/themes/src/spring/SpringTheme.hpp
+++ b/themes/src/spring/SpringTheme.hpp
@@ -4,6 +4,7 @@
#include "../mathlib.h"
#include "../types.h"
#include "../Renderer3d.h"
+#include "../theme.h"
enum class SpringThemeState {
@@ -15,7 +16,10 @@ enum class SpringThemeState {
Idle
};
-struct SpringTheme {
+class SpringTheme : public Theme {
+public:
+ SpringTheme(WebglContext*);
+ ~SpringTheme();
Renderer3d renderer;
SpringThemeState state;
f32 bunnySpeed = 5.f;
@@ -38,4 +42,4 @@ struct SpringTheme {
void unload();
};
-#endif \ No newline at end of file
+#endif