Files
escape-the-dawn/Escape-the-Dawn/Texture.cpp
T
2014-03-07 20:34:40 +01:00

26 lines
343 B
C++

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