mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user