29 lines
410 B
C++
29 lines
410 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <glad/glad.h>
|
|
#include <string>
|
|
|
|
class Texture {
|
|
|
|
public:
|
|
|
|
Texture(const char* texturePath, GLuint shaderProgramId);
|
|
~Texture();
|
|
|
|
void bind(uint8_t textureUnit);
|
|
void unbind();
|
|
|
|
private:
|
|
|
|
int32_t textureWidth;
|
|
int32_t textureHeight;
|
|
int32_t bitsPerPixel;
|
|
|
|
GLuint textureId;
|
|
|
|
std::string textureType;
|
|
|
|
GLuint shaderProgramId;
|
|
|
|
}; |