Commit Graph

181 Commits

Author SHA1 Message Date
Alex Szpakowski c215541d6c Merged mage-CompressedData into default 2013-04-09 23:44:00 -03:00
Alex Szpakowski 4cd14d5c08 Made the getSize() and getData() methods for CompressedData consistent with each other. Note that CompressedData's data may not all be contiguous in memory, so getData(miplevel) and getSize(miplevel) should always be used instead.
--HG--
branch : image-CompressedData
2013-04-09 23:39:20 -03:00
Alex Szpakowski 9abfb9e23b Improved performance of ImageData:getPixel and ImageData:mapPixel 2013-04-09 18:12:03 -03:00
Alex Szpakowski ab2c4aca7e Removed an unused graphics Image method
--HG--
branch : image-CompressedData
2013-04-08 21:58:20 -03:00
Alex Szpakowski 7403245715 Cosmetic code improvements
--HG--
branch : image-CompressedData
2013-04-07 22:58:08 -03:00
Alex Szpakowski 88d64954a4 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
2013-04-07 17:18:34 -03:00
Alex Szpakowski 8a8adcce39 Code cleanup
--HG--
branch : image-CompressedData
2013-04-05 18:55:44 -03:00
Alex Szpakowski 5301026f3c Added support for DXT1/3/5 and BC5/7 compressed textures via love.image.CompressedData. Some internals are still iffy.
- added a new CompressedData type to love.image
- added love.image.isCompressed(file or data)
- love.graphics.newImage automatically tests for compression when loading a file
- added love.graphics.isSupported strings for DXT, BC5, and BC7

Compressed textures meant to be used on the GPU offer huge performance gains when
- loading the texture from a file
- loading the texture from RAM to VRAM
- loading mipmaps
- rendering

--HG--
branch : image-CompressedData
2013-04-04 19:09:18 -03:00
Alex Szpakowski d5aa807747 More internal code cleanup 2013-03-31 19:02:27 -03:00
Alex Szpakowski 1a1d59384a Fixed some memory leaks in love.graphics.newImageData and ImageData:encode. 2013-03-30 16:39:50 -03:00
darthfodder 275a144907 Remove commented out line 2013-03-25 20:43:51 -07:00
darthfodder 69ccf4aaa1 Set default alpha value on ImageData:setPixel to 255. resolves #575
--HG--
branch : imagedata-alpha-default
2013-03-25 11:42:19 -07:00
Alex Szpakowski b60cce7d3a Removed gif 'support' from ImageData:encode (it never worked, DevIL doesn't support saving gifs) 2013-03-21 03:17:37 -03:00
Alex Szpakowski 9e9eb42f1d Fixed filedata not being cleaned up when love.image.newImageData(filepath) fails 2013-03-19 09:01:15 -03:00
Alex Szpakowski e869b71c43 Fixed crash in ImageData:paste 2013-03-12 17:16:39 -03:00
Alex Szpakowski 17bcab4f32 Added love.graphics.getDimensions and Image/Canvas/ImageData:getDimensions (issue #566) 2013-03-11 19:03:37 -03:00
Bart van Strien 3d0c5761ce Merge in default, update changelog
--HG--
branch : minor
2013-03-03 19:51:04 +01:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
vrld c70cd5b8ee Merge default branch
--HG--
branch : minor
2012-11-23 10:24:46 +01:00
vrld 7c2889afae Fix issue #514: Redundant if-clause in ImageData::paste 2012-11-23 09:12:07 +01:00
Bart van Strien 399a6a6614 Merge in channels from love-experiments
Rewritten love.thread and changed communication
method from weird system before, to channels.

--HG--
branch : minor
2012-07-04 17:15:16 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Boolsheet 73672bd674 Clean up love.image because we own the memory, not DevIL 2012-05-29 23:36:49 +02:00
Bart van Strien 830283ff17 Properly catch exceptions thrown by ImageData:getPixel/setPixel, thereby preventing an uncaught exception for an invalid index. (Bug #381) 2012-03-03 12:35:55 +01:00
Bart van Strien 4ee7e780e7 Fix ImageData:paste optimization, missing dy and sy and check of sw and sh 2012-02-26 18:24:14 +01:00
Bart van Strien d525349549 Fix usage of a string past its lifetime, and set a default type for encode 2012-01-12 11:30:09 +01:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien 7bd08ad72d Dramatically speed up ImageData:paste (issue #336) 2011-12-31 16:34:34 +01:00
Bart van Strien c707a4ca45 Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations) 2011-12-24 01:10:40 +01:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
Bart van Strien ceab3f7a44 Catch exceptions thrown while encoding image data (issue #282) 2011-08-22 18:07:50 +02:00
Bart van Strien 94ec448a1b Fix getPixel 2011-07-03 12:49:11 +02:00
Bart van Strien f993fe99d3 Catch errors in getPixel and setPixel (bug #93) 2011-07-02 16:24:58 +02:00
Bart van Strien e5cd9f04d2 Apply Boolsheet's cosmetics (ticket #200) 2011-06-30 13:13:58 +02:00
Bart van Strien 176fb7d2f5 Manage our own ImageData, thereby bypassing DevILs thread-safety issues (bug #200) 2011-06-29 12:49:31 +02:00
Bart van Strien 360c190ef7 Move po2ifying to Image, Quads broken at the moment 2011-05-15 23:31:12 +02:00
Bill Meltsner 2e9e5a1502 make po2 stuff better 2011-05-15 16:33:38 -04:00
Bart van Strien af809ab210 Switch to bitwise ops to po2ify 2011-05-15 22:10:17 +02:00
Bart van Strien cf60754ef0 Make love.image automatically pad ImageData (and thus all images) to PO2.
Two notes:
- I don't think I ever clear the textures, so are they only transparent by coincidence?
- Maybe it's best if we surround the actually po2-ifying with ifs if we ever find a way to test if it's needed.
2011-05-13 15:55:41 +02:00
Bart van Strien 4fd9888a16 Merge in minor branch, now minor is our next development target 2011-05-07 14:12:41 +02:00
Bart van Strien 316ca607df Oops 2011-04-23 19:18:05 +02:00
Bart van Strien d60ad99da1 Prevent old DevIL errors from causing love errors 2011-04-23 19:16:17 +02:00
Bart van Strien cdf85280b6 Fix 2 compiler warnings 2011-04-08 09:12:30 +02:00
Bart van Strien d55941f7fa No more crashes when there is no memory for newImageData (issue #209) 2011-04-07 19:22:55 +02:00
rude 3fe9b2ff16 Reverted module selection feature. This is not really desired.
Users (or lovers) do not get to choose which implementation of
a module they would like to use.

The abstraction is for dealing with portability issues, not
for giving people the ability to choose an alternative
(inferior) backend. The best choice for any platform/situation
should at all times be the *default* for that platform/situation.
If this is not the case; it's a bug (that is easily fixed).

Any module should provide the functionality promised in the docs.
The lover (or user) should not care how, and if [s]he does, [s]he
does still not get to choose.

Also, a related note: duplication of wrapper code is something I
especially wanted to avoid when I first (or should I say ...
"eventually") formed the current architecture.

--HG--
branch : minor
2011-03-26 17:06:05 +01:00
Bill Meltsner cee7a4ccdb Removed EncodedImageData, added three new encoded image formats, and changed the way screenshots work - saving screenshots will be broken until we have some way of flipping ImageData, though
--HG--
branch : minor
2011-03-19 23:41:07 -05:00
Bart van Strien b4139ffab5 Rename loaders to fit their locations
--HG--
branch : minor
2011-03-13 20:25:35 +01:00
Bart van Strien ff387790ce Move luaopen_love_image from love.image to love.image.devil
--HG--
branch : minor
2011-03-13 19:51:08 +01:00
Bill Meltsner f512bd192f added TGA alpha support as per Boolsheet's patch in issue #156 2011-02-11 11:40:37 -05:00