SparrowRenderer/asciientity.cpp
2015-07-23 17:43:46 +02:00

23 lines
556 B
C++

#include "asciientity.h"
#include <glm/ext.hpp>
#define TEX_ID 0
void ASCIIMaterial::bindAttributes()
{
shader->bindVec4(shader->getLocation("backColor"), backColor);
shader->bindVec4(shader->getLocation("fontColor"), fontColor);
if(glyphMap != NULL)
{
glyphMap->bind(TEX_ID);
shader->bindInteger(shader->getLocation("glyphMap"), TEX_ID);
}
}
void ASCIIEntity::updateModelView()
{
modelView = glm::translate(glm::mat4(), glm::vec3(position, 0));
modelView = glm::scalemodel(modelView, glm::vec3(size, 1));
}