summaryrefslogtreecommitdiff
path: root/themes/TreeShape.cpp
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-01-16 18:32:50 -0500
committermattkae <mattkae@protonmail.com>2022-01-16 18:32:50 -0500
commit1d47e3aa120539e053ffa41293f3f756b9d07844 (patch)
tree864069813b642d7634f83b6a8843c3d23a8d4926 /themes/TreeShape.cpp
parenteef48388c610bf37b07aedef03c55344d450386b (diff)
Successful beginnings of the winter theme
Diffstat (limited to 'themes/TreeShape.cpp')
-rw-r--r--themes/TreeShape.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/themes/TreeShape.cpp b/themes/TreeShape.cpp
index 797ceca..08170ea 100644
--- a/themes/TreeShape.cpp
+++ b/themes/TreeShape.cpp
@@ -59,6 +59,12 @@ TreeShapeLoadResult TreeShape::load(Renderer2d* renderer) {
glEnableVertexAttribArray(renderer->attributes.color);
glVertexAttribPointer(renderer->attributes.color, 4, GL_FLOAT, GL_FALSE, sizeof(Renderer2dVertex), (GLvoid *)offsetof(Renderer2dVertex, color));
+ for (int32 idx = 0; idx < 4; idx++) {
+ glEnableVertexAttribArray(renderer->attributes.vMatrix + idx);
+ glVertexAttribPointer(renderer->attributes.vMatrix + idx, 4, GL_FLOAT, GL_FALSE, sizeof(Renderer2dVertex), (GLvoid *)(offsetof(Renderer2dVertex, vMatrix) + (idx * 16)));
+ glVertexAttribDivisor(renderer->attributes.vMatrix + idx, 1);
+ }
+
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);