mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
Add files via upload
This commit is contained in:
commit
e1cdcf01e9
49 changed files with 2866 additions and 0 deletions
21
src/graphics/Texture.h
Normal file
21
src/graphics/Texture.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef GRAPHICS_TEXTURE_H_
|
||||
#define GRAPHICS_TEXTURE_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
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();
|
||||
|
||||
void bind();
|
||||
void reload(unsigned char* data);
|
||||
};
|
||||
|
||||
extern Texture* load_texture(std::string filename);
|
||||
|
||||
#endif /* GRAPHICS_TEXTURE_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue