Added Texture class
This commit is contained in:
parent
1b2ed0cdf5
commit
e2e15dd98f
13 changed files with 8005 additions and 35 deletions
32
include/texture.hpp
Normal file
32
include/texture.hpp
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue