TazGraph Project v0.1.0
Loading...
Searching...
No Matches
LightRenderer.h
1#pragma once
2
3#include "../../Renderer.h"
4
5
6// init --_
7// `-->begin()
8// |
9// | --> draw()
10// | --> draw()
11// |
12// |--> end()
13// `--> renderBatch()
14
16public:
19
20 void init();
21
22 void begin();
23
24 void initBatch(Taz::RenderBatch& batch);
25
26 void drawTriangle(
27 size_t v_index,
28 const glm::vec3& position,
29 const glm::vec3& size,
30 const glm::vec3& cpuRotation,
31 const TazColor& color);
32
33 void draw(size_t v_index,
34 const glm::vec2& rectSize,
35 const glm::vec3& position,
36 const glm::vec3& mRotation,
37 const TazColor& color);
38
39 void drawBox(size_t v_index,
40 const glm::vec3& boxSize,
41 const glm::vec3& position,
42 const glm::vec3& mRotation,
43 const TazColor& color);
44
45 void drawSphere(size_t v_index,
46 const glm::vec3& sphereSize,
47 const glm::vec3& position,
48 const glm::vec3& mRotation,
49 const TazColor& color);
50
51 void endBatch(const Taz::RenderBatch& batch) override;
52
53 void dispose();
54
55 std::vector<TazLightVertex> sphereVertices = {
56 // Generated vertices will go here
57 };
58
59 std::vector<GLuint> sphereIndices = {
60 // Generated indices will go here
61 };
62
63private:
64 void createInstancesVBO();
65 void createVertexArray();
66
67 std::vector<ColorMeshRenderer> _meshesArrays;
68 std::vector<ColorMeshRenderer> _meshesElements;
69
70 size_t currentBatchIndex = 0;
71
72};
Definition LightRenderer.h:15
void draw(size_t v_index, const glm::vec2 &rectSize, const glm::vec3 &position, const glm::vec3 &mRotation, const TazColor &color)
draws are needed to convert the pos and size to vertices
Definition LightRenderer.cpp:86
Definition Renderer.h:51
Definition Vertex.h:44
Definition Renderer.h:19