#include "texture.h"
static Shader* shader;
static Mesh* mesh;
static Texture* texture;
Vertex vertices[] = {
        { -0.6f,  0.0f, 0.0f,    0.0f, 0.5f },
        {  0.0f, -0.6f, 0.0f,    0.5f, 1.0f },
        {  0.6f,  0.0f, 0.0f,    1.0f, 0.5f },
        { -0.6f,  0.0f, 0.0f,    0.0f, 0.5f },
        {  0.6f,  0.0f, 0.0f,    1.0f, 0.5f },
        {  0.0f,  0.6f, 0.0f,    0.5f, 0.0f },
    };
    mesh = new Mesh(vertices, 6);
    
    shader = new Shader("shaders/vertex_shader.glsl", "shaders/fragment_shader.glsl");
    texture = new Texture("textures/thm2k.png");
void graphicsLoop()
{
    setViewport();
    
    glClear(GL_COLOR_BUFFER_BIT);

    shader->activate();
    shader->setMatrix("ProjectionMatrix", projectionMatrix);
    shader->setMatrix("ViewMatrix", viewMatrix);
    shader->setMatrix("WorldMatrix", matrixTranslate(0,0,0));
    shader->setTexture("Diffuse", texture);
    mesh->draw();
}
void graphicsTerminate()
{
    delete shader;
    delete mesh;
    delete texture;
}