- some initial work to allow saving models in the current v4 g3d format (new commandline option to test it also) and also convert textures into png

This commit is contained in:
Mark Vejvoda
2011-03-12 21:29:37 +00:00
parent f88836203a
commit c67d7d48c2
3 changed files with 255 additions and 48 deletions

View File

@@ -46,6 +46,7 @@ private:
bool texturesOwned[meshTextureCount];
string texturePaths[meshTextureCount];
string name;
//vertex data counts
uint32 frameCount;
uint32 vertexCount;
@@ -69,6 +70,8 @@ private:
bool twoSided;
bool customColor;
uint32 textureFlags;
InterpolationData *interpolationData;
TextureManager *textureManager;
@@ -128,11 +131,15 @@ public:
void updateInterpolationData(float t, bool cycle);
void updateInterpolationVertices(float t, bool cycle);
Texture2D *loadMeshTexture(TextureManager *textureManager, string textureFile,
int textureChannelCount, bool &textureOwned,
bool deletePixMapAfterLoad);
//load
void loadV2(const string &dir, FILE *f, TextureManager *textureManager,bool deletePixMapAfterLoad);
void loadV3(const string &dir, FILE *f, TextureManager *textureManager,bool deletePixMapAfterLoad);
void load(const string &dir, FILE *f, TextureManager *textureManager,bool deletePixMapAfterLoad);
void save(const string &dir, FILE *f);
void save(const string &dir, FILE *f, TextureManager *textureManager, string convertTextureToFormat);
void deletePixels();
@@ -185,9 +192,9 @@ public:
//io
void load(const string &path,bool deletePixMapAfterLoad=false);
void save(const string &path);
void save(const string &path, string convertTextureToFormat="");
void loadG3d(const string &path,bool deletePixMapAfterLoad=false);
void saveS3d(const string &path);
void saveG3d(const string &path, string convertTextureToFormat="");
void setTextureManager(TextureManager *textureManager) {this->textureManager= textureManager;}
void deletePixels();