mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Added graphics/ImageData class
This commit is contained in:
parent
a91fbe7166
commit
ffd3e3f852
9 changed files with 110 additions and 61 deletions
|
|
@ -3,17 +3,21 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
class ImageData;
|
||||
|
||||
class Texture {
|
||||
public:
|
||||
unsigned int id;
|
||||
int width;
|
||||
int height;
|
||||
Texture(unsigned int id, int width, int height);
|
||||
Texture(unsigned char* data, int width, int height);
|
||||
Texture(unsigned char* data, int width, int height, uint format);
|
||||
~Texture();
|
||||
|
||||
void bind();
|
||||
void reload(unsigned char* data);
|
||||
|
||||
static Texture* from(const ImageData* image);
|
||||
};
|
||||
|
||||
#endif /* GRAPHICS_TEXTURE_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue