mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
Initial commit: wowee native WoW 3.3.5a client
This commit is contained in:
commit
ce6cb8f38e
147 changed files with 32347 additions and 0 deletions
31
include/rendering/texture.hpp
Normal file
31
include/rendering/texture.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <GL/glew.h>
|
||||
|
||||
namespace wowee {
|
||||
namespace rendering {
|
||||
|
||||
class Texture {
|
||||
public:
|
||||
Texture() = default;
|
||||
~Texture();
|
||||
|
||||
bool loadFromFile(const std::string& path);
|
||||
bool loadFromMemory(const unsigned char* data, int width, int height, int channels);
|
||||
|
||||
void bind(GLuint unit = 0) const;
|
||||
void unbind() const;
|
||||
|
||||
GLuint getID() const { return textureID; }
|
||||
int getWidth() const { return width; }
|
||||
int getHeight() const { return height; }
|
||||
|
||||
private:
|
||||
GLuint textureID = 0;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
};
|
||||
|
||||
} // namespace rendering
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue