Model + Texture

This commit is contained in:
ViktorLjung
2014-03-07 20:34:40 +01:00
parent 95a36794e3
commit 800b4a3045
22 changed files with 16705 additions and 60 deletions
+25
View File
@@ -0,0 +1,25 @@
#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);
}