23 lines
614 B
C++
23 lines
614 B
C++
#pragma once
|
|
|
|
namespace {
|
|
// Texture2D is able to store and configure a texture in OpenGL
|
|
// It also hosts utility functions for easy management.
|
|
class Texture2D {
|
|
public:
|
|
unsigned int ID; // ID of the texture object
|
|
unsigned int Width, Height;
|
|
unsigned int InternalFormat;
|
|
unsigned int ImageFormat;
|
|
unsigned int WrapS;
|
|
unsigned int WrapT;
|
|
unsigned int Filter_Min;
|
|
unsigned int Filter_Max;
|
|
|
|
Texture2D();
|
|
|
|
void Generate(unsigned int width, unsigned int height, unsigned char *data);
|
|
|
|
void Bind() const;
|
|
};
|
|
} |