diff --git a/CubemapConvert.cpp b/CubemapConvert.cpp index e088fbd..10a9d58 100644 --- a/CubemapConvert.cpp +++ b/CubemapConvert.cpp @@ -80,20 +80,20 @@ bool ConvertCubemap(const OSString &filename,const OSStringList &file_list,const return(false); } - for(uint face=0;face<6;face++) + for(int i=0;iInitFormat(&image[face])) + for(uint face=0;face<6;face++) { - LOG_ERROR(OS_TEXT("Init texture format failed.")); - return(false); - } + image[face].Bind(); + width=image[face].width(); + height=image[face].height(); + + if (!tex_file_creater->InitFormat(&image[face])) + { + LOG_ERROR(OS_TEXT("Init texture format failed.")); + return(false); + } - for(int i=0;iWrite(); if(bytes<=0) @@ -103,14 +103,18 @@ bool ConvertCubemap(const OSString &filename,const OSStringList &file_list,const } total+=bytes; + } - if(miplevel>1&&i1)width>>=1; - if(height>1)height>>=1; + if(miplevel>1&&i1)width>>=1; + if(height>1)height>>=1; + } - image[face].Resize(width,height); - } + for(uint face=0;face<6;face++) + { + image[face].Bind(); + image[face].Resize(width,height); } } diff --git a/TextureFileCreaterCompress.cpp b/TextureFileCreaterCompress.cpp index 3228f4c..436283c 100644 --- a/TextureFileCreaterCompress.cpp +++ b/TextureFileCreaterCompress.cpp @@ -66,7 +66,7 @@ public: target_fmt_name=fmt_name_list[fmt_index]; - std::cout<<"Compress Image to "<