#include "Renderer.h"
#include <GL/glew.h>

Renderer::Renderer() {
	glClearColor(1.f,1.f,1.f,1.f);
}

void Renderer::draw(const Mesh& mesh, Shader& shader) {
    //Bind texture of mesh
    mesh.bindTexture();
    mesh.bindVAO();
    //draw Mesh
	glDrawElements(GL_TRIANGLES, mesh.getIndicesCount(), GL_UNSIGNED_INT, 0);
}

void Renderer::clear() const {
    glClear(GL_COLOR_BUFFER_BIT);
}