mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Replaced the devil love.image module with love.image.magpie, which can decide which image library to use in a similar manner to love.sound.lullaby. Some rough edges still exist.
love.filesystem.newFileData now accepts filepaths and File objects. --HG-- branch : image-CompressedData
This commit is contained in:
@@ -537,10 +537,10 @@ GLenum Image::getCompressedFormat(image::CompressedData::TextureType type) const
|
||||
return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
|
||||
case image::CompressedData::TYPE_DXT5:
|
||||
return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
||||
case image::CompressedData::TYPE_BC5s:
|
||||
return GL_COMPRESSED_SIGNED_RG_RGTC2;
|
||||
case image::CompressedData::TYPE_BC5:
|
||||
return GL_COMPRESSED_RG_RGTC2;
|
||||
case image::CompressedData::TYPE_BC5s:
|
||||
return GL_COMPRESSED_SIGNED_RG_RGTC2;
|
||||
case image::CompressedData::TYPE_BC7:
|
||||
return GL_COMPRESSED_RGBA_BPTC_UNORM_ARB;
|
||||
case image::CompressedData::TYPE_BC7srgb:
|
||||
@@ -587,8 +587,8 @@ bool Image::hasCompressedTextureSupport(image::CompressedData::TextureType type)
|
||||
case image::CompressedData::TYPE_DXT5:
|
||||
return GLEE_EXT_texture_compression_s3tc;
|
||||
|
||||
case image::CompressedData::TYPE_BC5s:
|
||||
case image::CompressedData::TYPE_BC5:
|
||||
case image::CompressedData::TYPE_BC5s:
|
||||
return (GLEE_VERSION_3_0 || GLEE_ARB_texture_compression_rgtc || GLEE_EXT_texture_compression_rgtc);
|
||||
|
||||
case image::CompressedData::TYPE_BC7:
|
||||
|
||||
@@ -279,12 +279,12 @@ int w_newImage(lua_State *L)
|
||||
love::image::ImageData *data = 0;
|
||||
love::image::CompressedData *cdata = 0;
|
||||
|
||||
// Convert to File, if necessary.
|
||||
if (lua_isstring(L, 1))
|
||||
luax_convobj(L, 1, "filesystem", "newFile");
|
||||
// Convert to FileData, if necessary.
|
||||
if (lua_isstring(L, 1) || luax_istype(L, 1, FILESYSTEM_FILE_T))
|
||||
luax_convobj(L, 1, "filesystem", "newFileData");
|
||||
|
||||
// Convert to ImageData/CompressedData, if necessary.
|
||||
if (luax_istype(L, 1, FILESYSTEM_FILE_T))
|
||||
if (luax_istype(L, 1, FILESYSTEM_FILE_DATA_T))
|
||||
{
|
||||
// Determine whether to convert to ImageData or CompressedData.
|
||||
luax_getfunction(L, "image", "isCompressed");
|
||||
|
||||
Reference in New Issue
Block a user