summaryrefslogtreecommitdiff
path: root/themes/deprecated/TreeRenderer.h
blob: b5f18d50c902087f889d180818bae60071906cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "WebglContext.h"
#include "types.h"
#include "Shader.h"
#include "mathlib.h"

struct WebglContext;

struct TreeRenderer {
	Mat4x4 projection;
	u32 shader;
    Vector4 clearColor;

	struct {
		i32 position;
		i32 color;
	} attributes;

	struct {
		i32 projection;
		i32 model;
	} uniforms;

    f32 timeElapsed = 0.f;
    f32 frequency = 5.f;

	void load(WebglContext* context);
	void render(f32 dtSeconds);
	void unload();
};

struct TreeRendererVertex {
	Vector2 position;
	Vector4 color;
};