14 #include <glm/gtc/matrix_transform.hpp>
17 std::vector<glm::vec3> verts;
18 std::vector<glm::vec3> cols;
19 std::vector<unsigned short> inds;
21 for (
int i = 0; i < 8; i++) {
22 verts.push_back(
corner[i]);
23 cols.push_back(colorLine);
52 for (
int i = 0; i < 8; i++) {
53 cols.push_back(colorDot);
67 glm::mat4 translate = glm::translate(glm::mat4(1.0f), glm::vec3(pos.x, -pos.y, pos.z));
68 glm::mat4 rotate = glm::rotate(glm::mat4(1.0f), angle, glm::vec3(0.0f, 1.0f, 0.0f));
69 model = translate * rotate;
88 glm::mat4 translate = glm::translate(glm::mat4(1.0f), glm::vec3(
pos.x, -
pos.y,
pos.z));
89 glm::mat4 rotate = glm::rotate(glm::mat4(1.0f),
Camera::getRotation().x, glm::vec3(0.0f, 1.0f,
91 glm::mat4 model = translate * rotate;
void display(glm::mat4 VP, glm::vec3 colorLine, glm::vec3 colorDot)
void bufferData(int elem, int size, void *data)
void display(glm::mat4 VP)
StaticMesh & getStaticMesh(unsigned long index)
OpenGL Shader Implementation.
unsigned long sizeStaticMesh()
void display(glm::mat4 VP)
static void drawGL(ShaderBuffer &vertices, ShaderBuffer &uvs, glm::vec4 color, unsigned int texture, TextureStorage store=TextureStorage::SYSTEM, unsigned int mode=GL_TRIANGLES, ShaderTexture *target=nullptr, Shader &shader=textShader)
StaticModel(glm::vec3 pos, float angle, int i)
void display(glm::mat4 MVP)
Sprite & getSprite(unsigned long index)
#define assertGreaterThanEqual(x, y)
void display(glm::mat4 MVP)
static glm::vec2 getRotation()