summaryrefslogtreecommitdiff
path: root/themes/deprecated/TreeRenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'themes/deprecated/TreeRenderer.h')
-rw-r--r--themes/deprecated/TreeRenderer.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/themes/deprecated/TreeRenderer.h b/themes/deprecated/TreeRenderer.h
new file mode 100644
index 0000000..8a8bf7f
--- /dev/null
+++ b/themes/deprecated/TreeRenderer.h
@@ -0,0 +1,36 @@
+#pragma once
+
+#include "WebglContext.h"
+#include "types.h"
+#include "Shader.h"
+#include "mathlib.h"
+
+struct WebglContext;
+
+struct TreeRenderer {
+ Mat4x4 projection;
+ uint32 shader;
+ Vector4 clearColor;
+
+ struct {
+ int32 position;
+ int32 color;
+ } attributes;
+
+ struct {
+ int32 projection;
+ int32 model;
+ } uniforms;
+
+ float32 timeElapsed = 0.f;
+ float32 frequency = 5.f;
+
+ void load(WebglContext* context);
+ void render(float32 dtSeconds);
+ void unload();
+};
+
+struct TreeRendererVertex {
+ Vector2 position;
+ Vector4 color;
+};