summaryrefslogtreecommitdiff
path: root/themes/deprecated/TreeRenderer.h
blob: 8a8bf7ff109c7f4b95605a94df821424e27709de (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;
	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;
};