// // Created by lukas on 04.02.22. // #define GL_GLEXT_PROTOTYPES #include #include #include #include #include "BaseBlock.h" #include "BlockRenderer.h" void BaseBlock::render() { glm::mat4 position = glm::translate(glm::mat4(1.0f), glm::vec3((float) xpos * 2, (float) ypos * 2, (float) zpos * 2)); glUniformMatrix4fv(BlockRenderer::getInstance()->getUniformhandle("translation"), 1, GL_FALSE, &position[0][0]); texture->Bind(); BlockRenderer::getInstance()->render(); } BaseBlock::BaseBlock(uint xpos, uint ypos, uint zpos, Texture *texture): xpos(xpos), ypos(ypos), zpos(zpos), texture(texture) { }