28 lines
662 B
C++
28 lines
662 B
C++
#include "asciientity.h"
|
|
#include <glm/ext.hpp>
|
|
#include "texture.h"
|
|
|
|
#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::scale(modelView, glm::vec3(size, 1));
|
|
}
|
|
|
|
void ASCIIEntity::draw(const glm::mat4 viewMatrix, const glm::mat4 projectionMatrix)
|
|
{
|
|
|
|
}
|