Adapted Escape the Dawn engine.

This commit is contained in:
2014-04-04 23:14:18 +02:00
parent 6a64de37fb
commit a7985b1686
64 changed files with 3384 additions and 79 deletions
+26
View File
@@ -0,0 +1,26 @@
#include "PrecompiledHeader.h"
#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);
}