Alex Szpakowski
60d90ca4a8
Merge default into minor
...
--HG--
branch : minor
2016-10-30 01:07:39 -03:00
Alex Szpakowski
5ba449d1ff
Add support for BC4-7 compressed texture formats in KTX files. Updated the changelog.
2016-10-29 23:42:40 -03:00
Alex Szpakowski
c6f8a1535d
Fixed loading and saving 16 bit per component PNGs.
...
--HG--
branch : minor
2016-10-28 00:13:36 -03:00
Alex Szpakowski
3de1aa863a
Fix encoding ImageData to 16 bit per color channel PNG.
...
--HG--
branch : minor
2016-10-27 22:23:24 -03:00
Alex Szpakowski
27044e6eb8
Update tinyexr.
...
--HG--
branch : minor
2016-10-18 23:30:52 -03:00
Alex Szpakowski
e71f95595c
ImageData (and Images loaded from them) now support different data formats. Resolves issue #1048 .
...
Currently exposed formats are rgba8 and rgba16 (normalized), and rgba16f and rgba32f (floating-point). Some systems, especially mobile ones, won't support every format when creating a love.graphics Image. Use love.graphics.getRawImageFormats to check for support.
love.image.newImageData now takes an optional format parameter as its third argument when creating an empty sized ImageData. It defaults to rgba8.
16-bit PNGs, .hdr images, and floating-point OpenEXR images can now be loaded via love.image.newImageData and love.graphics.newImage.
--HG--
branch : minor
2016-05-22 15:28:20 -03:00
Alex Szpakowski
8d7481c3b2
Improved the error message given when jpeg, TGA, and BMP images fail to decode.
2016-02-28 12:41:27 -04:00
Alex Szpakowski
46a2e7b85c
Happy new year! 🎉
2016-01-01 00:05:06 -04:00
Bart van Strien
22f2175bec
Add initial video playback support for Ogg Theora videos (resolves issue #66.)
...
The basic APIs are:
video = love.graphics.newVideo("myvideo.ogv")
love.graphics.draw(video, ...) -- Video objects are Drawables.
video:play(), video:pause()
video:getDuration(), video:tell(), video:rewind(), video:seek(seconds)
video:getSource()
video:getWidth(), video:getHeight(), video:setFilter(min, mag)
More advanced APIs include video:setSource(source), video:getStream(), and videostream:setSync.
To use a custom pixel shader when drawing a Video, call the new TexelVideo(texcoords) function instead of Texel(texture, texcoords) in order to get the pixel colors of a video frame.
2015-12-08 22:41:19 -04:00
Alex Szpakowski
2c4e713114
Imported some of the dynamiccore branch from love-experiments:
...
- Type names for love's Lua objects are specified as an argument to luax_register_type, rather than being statically defined in an array.
- luax_register_type takes a variable number of method array arguments, for registering superclass methods without copying them into the subclass' method array.
Also removed most of the header declarations for wrapper functions.
2015-11-29 20:38:12 -04:00
Alex Szpakowski
77998c707d
Added the ability to use ASTC compressed textures, when the system supports them.
2015-11-28 14:55:26 -04:00
Alex Szpakowski
7265f891de
Improved support for non-PVRTC compressed texture formats in .pvr files.
2015-11-28 10:33:17 -04:00
Alex Szpakowski
5fabd64aea
Improved the error message when an unsupported file format is used with love.image.newImageData or love.graphics.newImage.
2015-10-19 15:54:53 -03:00
Alex Szpakowski
99acec83c9
Renamed some internal functions to avoid name conflicts when some third-party code is #included.
2015-08-03 20:27:46 -03:00
Alex Szpakowski
2168d509b3
Reworked ImageData:encode:
...
- It now returns a FileData containing the encoded ImageData.
- The first argument is now the format to encode to.
- The second argument is now the filename to write to, and is optional. No file will be written if a filename is not given.
2015-07-04 22:30:09 -03:00
Bart van Strien
e3ff0a0d63
Fix possible segfault when a DecodeHandler fails to decode an image properly
2015-06-23 13:35:32 +02:00
Alex Szpakowski
aac595525a
Cleaned up some ImageData code.
2015-06-14 01:01:44 -03:00
Alex Szpakowski
c3fd7a25a3
Fixed some misc. compiler warnings.
2015-05-23 12:45:58 -03:00
Alex Szpakowski
60e8cc24bf
Removed iOS-specific code to decode and encode images using the ImageIO framework (it's now redundant.)
2015-05-03 20:49:06 -03:00
Alex Szpakowski
5dbf589d47
Removed libjpeg-turbo as a dependency (closes issue #1031.) Removed jpeg support for ImageData:encode. stb_image now handles jpeg image loading.
2015-05-03 17:52:20 -03:00
Alex Szpakowski
a29b349014
Added love.math.compress(data, format [, level]) and love.math.decompress(compresseddata) / love.math.decompress(compressedstring, format).
...
Renamed the love.image CompressedData type to CompressedImageData.
love.math.compress returns a love.math CompressedData object which holds the newly compressed data. Currently supported formats are "lz4" and "zlib". Note that the formats are not file formats and don't compress filesystem hierarchies.
2015-03-23 11:28:14 -03:00
Alex Szpakowski
d31168c0e0
Cleaned up some graphics code.
2015-03-20 00:16:36 -03:00
Alex Szpakowski
7741adc7b4
Switched back to zlib decompression for PNG images and fixed a memory leak issue when decompressing.
2015-03-19 17:08:44 -03:00
Alex Szpakowski
5138acaee5
Temporarily disabled zlib decompression for PNG images, in favour of LodePNG's built-in decompression code.
2015-03-19 14:41:15 -03:00
Alex Szpakowski
bf5f0b4175
bmp isn't a supported format for ImageData:encode.
...
--HG--
branch : minor
2015-03-01 23:38:34 -04:00
Alex Szpakowski
b9c90e8a6f
Fixed the background color for the error screen, and updated LodePNG to the latest version.
...
--HG--
branch : minor
2015-02-27 21:20:31 -04:00
Alex Szpakowski
ebc68023a7
Fix many warnings about implicit integer conversions when compiling for 64 bits.
...
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski
24c7539182
Updated some Xcode project settings
...
--HG--
branch : minor
2015-02-18 23:04:01 -04:00
Alex Szpakowski
28f4f42454
Cleaned up the code for determining whether an image can be decoded using stb_image.
...
--HG--
branch : minor
2015-02-18 00:43:09 -04:00
Alex Szpakowski
d0300a4fa7
Made the TurboJPEG code for decoding and encoding images disable-able.
...
--HG--
branch : minor
2015-02-18 00:18:47 -04:00
Alex Szpakowski
482b61187f
Added a new backend for loading and saving images using Apple's ImageIO framework. It's not enabled on any platform yet.
...
--HG--
branch : minor
2015-02-17 17:56:40 -04:00
Alex Szpakowski
18ab3973e8
Added support for ETC2/EAC compressed textures. Changed the CompressedFormat enum names to capitalize the format names (e.g. "PVR1rgba4" instead of "pvr1rgba4".) Improved sRGB support for compressed textures.
...
--HG--
branch : minor
2015-01-20 07:53:44 -04:00
Alex Szpakowski
c1d4613ff7
Updated stb_image to 2.0.2.
...
--HG--
branch : minor
2015-01-20 03:40:08 -04:00
Alex Szpakowski
dfdd52e499
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
2015-01-20 03:18:28 -04:00
Alex Szpakowski
a7e4148869
Merged default into minor
...
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
8dba668ce9
Merged default into minor
...
--HG--
branch : minor
2014-11-15 20:17:18 -04:00
Alex Szpakowski
22bbe74ed9
Allow BC6 and BC7 compressed DDS files to be loaded into Images.
2014-11-05 21:11:22 -04:00
Alex Szpakowski
8d0654a6a7
Added runtime drag-and-drop file and folder support via new love.filedropped and love.directorydropped event callback functions. filedropped has a single File object argument, and directorydropped has a single string argument containing the full path of the directory, which can be used with love.filesystem.mount.
...
--HG--
branch : minor
2014-10-18 20:30:36 -03:00
Alex Szpakowski
cf7342f8b7
Use C++11's in-line member initializers instead of default constructors with initializer lists, for some structs.
...
--HG--
branch : minor
2014-09-18 02:39:18 -03:00
Alex Szpakowski
6f6bf6a2bb
Merged default into minor
...
--HG--
branch : minor
2014-08-30 22:08:10 -03:00
Alex Szpakowski
40c6821048
Removed some dead code and fixed luax_pushtype when the object argument is null.
2014-08-28 00:48:32 -03:00
Alex Szpakowski
52b62e8620
Fixed a case of using new[]/delete[] when malloc/free should have been used.
...
--HG--
branch : minor
2014-08-27 21:53:33 -03:00
Alex Szpakowski
df5e48a082
Merged default into minor
...
--HG--
branch : minor
2014-08-13 01:50:52 -03:00
Alex Szpakowski
9e93d854b8
love.image.isCompressed should return true if the file contains a compressed texture, even if the file's extension isn't 'dds'.
2014-08-12 18:09:07 -03:00
Alex Szpakowski
fcf8329369
Fixed detection of TGA and BMP images and updated stb_image to the latest version.
...
--HG--
branch : minor
2014-08-11 03:11:51 -03:00
Alex Szpakowski
43a148ce3e
Fixed detection of PNG images.
...
--HG--
branch : minor
2014-08-11 02:42:12 -03:00
Alex Szpakowski
a757315006
Removed runtime support for Mac OS 10.6 and switched from libstdc++ to libc++ in OS X. Now we can use C++11's standard library!
...
--HG--
branch : minor
2014-08-08 18:54:12 -03:00
Alex Szpakowski
51d1f2a7a9
Added support for loading TGA and BMP images (via stb_image.) Added support for encoding ImageData to TGA.
...
--HG--
branch : minor
2014-05-29 13:20:10 -03:00
Alex Szpakowski
f3701dc0e1
Fixed ImageData:encode
...
--HG--
branch : minor
2014-05-29 00:27:40 -03:00