#include "graphics/background.h"

Background::Background(const std::string& fileName)
{
	// This will fallback to the generic shader.
	shaderID = 0;
	texture = new Texture();
	quad = new ScreenQuad();
	if (!texture->loadTexture(fileName.c_str()))
		LOG(ERROR, "Failed to load background texture: '{}'", fileName);
}

void Background::draw()
{
	texture->bind();
	quad->draw();
}

Background::~Background()
{
	delete texture;
	delete quad;
}
