Added Texture class

This commit is contained in:
Robert 2021-01-21 12:07:43 +01:00
parent 1b2ed0cdf5
commit e2e15dd98f
13 changed files with 8005 additions and 35 deletions

32
include/texture.hpp Normal file
View file

@ -0,0 +1,32 @@
#ifndef TEXTURE_HPP
#define TEXTURE_HPP
#include <core.hpp>
namespace oglu
{
void ActiveTexture(GLubyte index);
class OGLU_API AbstractTexture
{
public:
AbstractTexture(const AbstractTexture& other);
~AbstractTexture();
friend std::shared_ptr<AbstractTexture> OGLU_API MakeTexture(const char* filename);
void Bind();
void Unbind();
private:
AbstractTexture(const char* filename);
private:
int width, height, nrChannels;
GLuint texture;
};
typedef std::shared_ptr<AbstractTexture> Texture;
}
#endif