changed cubemaps write order.
This commit is contained in:
parent
29b98bba33
commit
4bac4e4e23
@ -80,6 +80,8 @@ bool ConvertCubemap(const OSString &filename,const OSStringList &file_list,const
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i=0;i<miplevel;i++)
|
||||||
|
{
|
||||||
for(uint face=0;face<6;face++)
|
for(uint face=0;face<6;face++)
|
||||||
{
|
{
|
||||||
image[face].Bind();
|
image[face].Bind();
|
||||||
@ -92,8 +94,6 @@ bool ConvertCubemap(const OSString &filename,const OSStringList &file_list,const
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0;i<miplevel;i++)
|
|
||||||
{
|
|
||||||
bytes=tex_file_creater->Write();
|
bytes=tex_file_creater->Write();
|
||||||
|
|
||||||
if(bytes<=0)
|
if(bytes<=0)
|
||||||
@ -103,14 +103,18 @@ bool ConvertCubemap(const OSString &filename,const OSStringList &file_list,const
|
|||||||
}
|
}
|
||||||
|
|
||||||
total+=bytes;
|
total+=bytes;
|
||||||
|
}
|
||||||
|
|
||||||
if(miplevel>1&&i<miplevel)
|
if(miplevel>1&&i<miplevel)
|
||||||
{
|
{
|
||||||
if(width>1)width>>=1;
|
if(width>1)width>>=1;
|
||||||
if(height>1)height>>=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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
target_fmt_name=fmt_name_list[fmt_index];
|
target_fmt_name=fmt_name_list[fmt_index];
|
||||||
|
|
||||||
std::cout<<"Compress Image to "<<target_fmt_name.c_str()<<" Format."<<std::endl;
|
// std::cout<<"Compress Image to "<<target_fmt_name.c_str()<<" Format."<<std::endl;
|
||||||
|
|
||||||
if(type==IL_UNSIGNED_BYTE ){cf=CF_8bit; pixel_bytes=1;}else
|
if(type==IL_UNSIGNED_BYTE ){cf=CF_8bit; pixel_bytes=1;}else
|
||||||
if(type==IL_UNSIGNED_SHORT ){cf=CF_16bit; pixel_bytes=2;}else
|
if(type==IL_UNSIGNED_SHORT ){cf=CF_16bit; pixel_bytes=2;}else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user