TazGraph Project v0.1.0
Loading...
Searching...
No Matches
PlaneModelRenderer.h
1#pragma once
2
3#include <GL/glew.h>
4#define GLM_ENABLE_EXPERIMENTAL
5#include <glm/glm.hpp>
6#include <vector>
7
8#include "../../../Vertex.h"
9#include "../../../GLSLProgram.h"
10#include "../PlaneRenderer.h"
11
12// init --_
13// `-->begin()
14// |
15// | --> draw()
16// | --> draw()
17// |
18// |--> end()
19// `--> renderBatch()
20
22public:
25
26 void init();
27
28 void begin();
29 void end();
30
31 void initBatchSize();
32
33 void drawTriangle(
34 size_t v_index,
35 const glm::vec3& triangleOffset,
36 const glm::vec3& mRotation,
37 const glm::vec2& uv1, const glm::vec2& uv2, const glm::vec2& uv3,
38 GLuint texture);
39
40 void draw(size_t v_index,
41 const glm::vec2& rectSize,
42 const glm::vec3& bodyCenter,
43 const glm::vec3& mRotation,
44 const glm::vec4& uvRect,
45 GLuint texture
46 );
47
48 void renderBatch(GLSLProgram* glsl_program);
49
50 void dispose();
51private:
52 void createInstancesVBO();
53 void createVertexArray();
54
55 std::vector<TextureMeshRenderer> _meshesElements;
56
57};
Definition GLSLProgram.h:306
Definition PlaneModelRenderer.h:21
Definition PlaneRenderer.h:20