animatable textures

This commit is contained in:
devZoGok
2021-10-19 19:06:40 +03:00
parent 6102373fbc
commit 89c25c5bd9
5 changed files with 51 additions and 7 deletions
+7 -3
View File
@@ -3,6 +3,7 @@
#include<string>
#include<ft2build.h>
#include"util.h"
#include FT_FREETYPE_H
namespace vb01{
@@ -14,16 +15,19 @@ namespace vb01{
Texture(int,int,bool=true);
Texture(FT_Face&,char);
Texture(std::string,bool=false);
Texture(std::string[],int,s64,bool=false);
Texture(std::string[6],bool=false);
void update();
void select(int=0);
inline unsigned int* getTexture(){return &texture;}
inline std::string getPath(){return path;}
private:
TextureType type=TextureType::TEXTURE_2D;
unsigned int texture;
int width,height,numChannels;
s64 updateRate=0,lastUpdateTime=0;
u32 texture,*frames;
int width,height,numChannels,numFrames=0,currentFrame=0;
float weight;
unsigned char *data;
u8 *data;
std::string path="",paths[6];
};
}