BlockGame/gl/Texture.cpp
2022-02-06 22:53:29 +01:00

27 lines
433 B
C++

//
// Created by lukas on 06.02.22.
//
#include "Texture.h"
#include "../bmploader.h"
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
Texture::Texture() {
}
void Texture::Bind() {
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, mTexturehandle);
}
void Texture::UnBind() {
glBindTexture(GL_TEXTURE_2D, 0);
}
void Texture::load(std::string path) {
mTexturehandle = bmploader().loadBMP(path.c_str());
}