TazGraph Project v0.1.0
Loading...
Searching...
No Matches
PlaneModelRenderer.h
1#pragma once
2
3#include "../../../Vertex.h"
4#include "../../Renderer.h"
5
6// init --_
7// `-->begin()
8// |
9// | --> draw()
10// | --> draw()
11// |
12// |--> end()
13// `--> renderBatch()
14
16public:
19
20 void init() override;
21
22 void begin() override;
23
24 void initBatch(Taz::RenderBatch& batch);
25
26 void drawTriangle(
27 size_t v_index,
28 const glm::vec3& triangleOffset,
29 const glm::vec3& mRotation,
30 const glm::vec2& uv1, const glm::vec2& uv2, const glm::vec2& uv3,
31 GLuint texture);
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 glm::vec4& uvRect,
38 GLuint texture
39 );
40
41 void endBatch(const Taz::RenderBatch& batch) override;
42
43 void dispose();
44private:
45 void createInstancesVBO();
46 void createVertexArray();
47
48 std::vector<TextureMeshRenderer> _meshesElements;
49
50 size_t currentBatchIndex = 0;
51
52};
Definition PlaneModelRenderer.h:15
Definition Renderer.h:51
Definition Renderer.h:19