Some code I used to resize a cubemap. I think the mipmaps might not be correct, but that's okay: Pasting here in case I need it again
auto plug = LoadPlugin("Plugins/ISPCTexComp.dll");
auto tex = LoadTexture(GetPath(PATH_DESKTOP) + "/diffuse.dds", LOAD_MIPCHAIN);
auto mipchain = tex->mipchain;
std::vector<shared_ptr<Pixmap> > chain2;
for (auto p : mipchain)
{
{
p = p->Convert(TEXTURE_RGBA16);
p = p->Resize(256, 256);
p = p->Convert(TEXTURE_BC6H);
chain2.push_back(p);
}
}
SaveTexture(GetPath(PATH_DESKTOP) + "/thumbnail_diffuse.dds", TEXTURE_CUBE, chain2, 6);
return 0;