Added support for ETC1 and PVR1 compressed textures contained in KTX, PKM, and PVR files.

Most desktop graphics drivers don't support those formats.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-01-20 03:18:28 -04:00
parent 319ccc2f25
commit dfdd52e499
21 changed files with 1136 additions and 340 deletions
+4 -4
View File
@@ -27,19 +27,19 @@ namespace image
namespace magpie
{
bool ddsHandler::canParse(const filesystem::FileData *data)
bool DDSHandler::canParse(const filesystem::FileData *data)
{
return dds::isCompressedDDS(data->getData(), data->getSize());
}
uint8 *ddsHandler::parse(filesystem::FileData *filedata, std::vector<CompressedData::SubImage> &images, size_t &dataSize, CompressedData::Format &format)
uint8 *DDSHandler::parse(filesystem::FileData *filedata, std::vector<CompressedData::SubImage> &images, size_t &dataSize, CompressedData::Format &format)
{
if (!dds::isDDS(filedata->getData(), filedata->getSize()))
throw love::Exception("Could not decode compressed data (not a DDS file?)");
CompressedData::Format texformat = CompressedData::FORMAT_UNKNOWN;
uint8 *data = 0;
uint8 *data = nullptr;
dataSize = 0;
images.clear();
@@ -99,7 +99,7 @@ uint8 *ddsHandler::parse(filesystem::FileData *filedata, std::vector<CompressedD
return data;
}
CompressedData::Format ddsHandler::convertFormat(dds::Format ddsformat)
CompressedData::Format DDSHandler::convertFormat(dds::Format ddsformat)
{
switch (ddsformat)
{