2022-02-06 13:47:33 +00:00
|
|
|
//
|
|
|
|
// Created by lukas on 06.02.22.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Texture.h"
|
|
|
|
#include "../bmploader.h"
|
2022-02-06 21:53:29 +00:00
|
|
|
|
2022-02-06 13:47:33 +00:00
|
|
|
#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);
|
|
|
|
}
|
2022-02-06 21:53:29 +00:00
|
|
|
|
|
|
|
void Texture::load(std::string path) {
|
|
|
|
mTexturehandle = bmploader().loadBMP(path.c_str());
|
|
|
|
}
|