Files
escape-the-dawn/Escape-the-Dawn/Texture.cpp
T
Tobias Dahl bb6cc1a23e Ghettomerge
2014-03-11 22:32:49 +01:00

26 lines
347 B
C++

#include "Texture.h"
Texture::Texture(std::string path)
{
Load(path);
}
void Texture::Load(std::string path)
{
texture = SOIL_load_OGL_texture(path.c_str(), 0, 0, SOIL_FLAG_INVERT_Y);
}
void Texture::Bind()
{
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texture);
}
Texture::~Texture()
{
glDeleteTextures(1, &texture);
}