27 lines
433 B
C++
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());
|
|
}
|