BlockGame/gl/Texture.cpp
2022-02-06 18:28:12 +01:00

23 lines
406 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() {
mTexturehandle = bmploader().loadBMP("../assets/blocks/block.bmp");
}
void Texture::Bind() {
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, mTexturehandle);
}
void Texture::UnBind() {
glBindTexture(GL_TEXTURE_2D, 0);
}