Alex Szpakowski
66942d5f31
Added the ability to use custom mipmaps in Images, via love.graphics.newImage(filename, {mipmap1, mipmap2, ...}). Resolves issue #1064 .
...
All mipmap levels must be present if custom mipmaps are used (and their sizes must be half the size of the previous mipmap level, rounded down.)
Image:getData now returns all custom mipmaps in an Image.
2015-07-30 20:48:36 -03:00
Bart van Strien
3cb777e2b7
Add basic lua 5.3 support
2015-06-16 10:25:41 +02: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
b39036eaa5
Added Image:getFlags.
2015-03-04 23:07:05 -04:00
Alex Szpakowski
3fea174008
Cleaned up some shader code.
...
--HG--
branch : minor
2015-03-02 15:18:12 -04:00
Alex Szpakowski
2f419c1c83
Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
...
--HG--
branch : minor
2015-03-01 18:32:41 -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
8a7481eaa3
Added optional xoffset/yoffset/width/height arguments to Image:refresh, to specify a sub-rectangle. Specifying a small sub-rectangle can improve the performance of Image:refresh.
...
--HG--
branch : minor
2014-08-26 09:40:24 -03:00
Alex Szpakowski
9b1f7d7a6e
Merged default into minor
...
--HG--
branch : minor
2014-08-09 19:55:29 -03:00
Alex Szpakowski
da7cd267ea
Changed luax_pushtype to retain the pushed object itself, but only if the object isn't in the Lua state already.
...
Previously, calling e.g. love.graphics.getFont() 10,000 times would retain the object 10,000 times (and release it 10,000 times when the Font object was garbage-collected in the Lua state.) Now it will only retain it once and release it once.
2014-08-09 16:04:59 -03:00
Alex Szpakowski
8483ea31a1
Changed love.graphics.newImage's optional second argument to be a table of flags. Current flags are 'mipmaps' and 'srgb'.
...
If mipmaps are enabled on image creation, the image will use the default mipmap filter (now 'nearest' by default.) Image:setMipmapFilter will error if the image was not created with mipmaps enabled.
--HG--
branch : minor
2014-06-05 17:19:31 -03:00
Alex Szpakowski
dfa319e01a
Replaced the EXCEPT_GUARD macro for converting love exceptions into Lua errors with the new luax_catchexcept function, which takes lambda function arguments.
2014-06-03 19:27:00 -03:00
Alex Szpakowski
510ed6f11e
Abstracted lua bindings for general Texture methods into wrap_Texture.cpp
2014-01-04 21:19:03 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
aa69a695d3
Canvases can now be used in SpriteBatches, ParticleSystems, and Meshes (resolves issue #782 ).
...
Canvases and Images are now subclasses of the new Texture class.
Added setTexture and getTexture methods for Meshes, ParticleSystems, and SpriteBatches (the old set/getImage methods are deprecated but not removed.)
Canvas texture coordinates are no longer flipped.
2014-01-03 17:07:12 -04:00
Alex Szpakowski
bcee9a222b
Made some float/int/unsigned char conversions explicit, fixed ParticleSystem:getColors, fixed love.mouse.isDown with x1 and x2 buttons
2013-09-26 00:36:50 -03:00
Alex Szpakowski
06f80d5c08
Fixed undefined behaviour when love exceptions are converted into Lua errors (resolves issue #729 )
2013-09-05 23:17:29 -03:00
Alex Szpakowski
ec9dec6b80
Replaced luax_newtype with luax_pushtype (and added luax_rawnewtype for the old functionality of luax_newtype.)
...
luax_pushtype keeps the object in a weak table and checks the table before creating a new userdata, so it re-uses the object's existing wrapper userdata if it can, whenever the object is pushed to Lua.
This fixes some subtle issues with love objects, where using them as keys in tables would not always work as expected (https://love2d.org/forums/viewtopic.php?f=4&t=39398&p=112388#p112415 ). It also decreases the amount of new Lua objects created, saving the garbage collector some work.
2013-08-29 00:40:06 -03:00
Alex Szpakowski
cd97e9ec05
Added Image:getData, returns the original ImageData (or CompressedData) used to create the image
2013-06-17 13:43:40 -03:00
Alex Szpakowski
b22f1aa16a
Added Image:refresh(), reloads a love.graphics image using the imagedata that created it
2013-04-10 00:15:43 -03:00
Alex Szpakowski
299ee64320
Added Image:isCompressed()
...
--HG--
branch : image-CompressedData
2013-04-07 23:11:11 -03:00
Alex Szpakowski
2009124cf9
Reworked internal anisotropic filtering code to be more concise and intuitive
2013-03-21 12:21:13 -03:00
Alex Szpakowski
25d6700361
Moved anisotropic filtering to Image:setFilter(min, mag, anisotropy), added anisotropic filtering support to canvases and fonts
2013-03-20 23:23:26 -03:00
Alex Szpakowski
8c406b7a4b
Added anisotropic filtering functionality for images, consolidated mipmap methods into Image:setMipmapFilter(filtermode, sharpness, anisotropy), added love.graphics.setDefaultMipmapFilter(filtermode, sharpness, anisotropy)
2013-03-19 22:42:12 -03:00
Alex Szpakowski
17bcab4f32
Added love.graphics.getDimensions and Image/Canvas/ImageData:getDimensions (issue #566 )
2013-03-11 19:03:37 -03:00
Alex Szpakowski
96161c66f6
Updated copyright text for the new year
2013-02-05 05:32:49 -04:00
rude
4e2c424cd1
Alexander's patch for improved mipmap API.
2013-01-19 11:25:25 +01:00
Alexander Szpakowski
e5388ff73b
Removed more unnecessary tabs in blank lines
2013-01-07 07:11:40 -04:00
Alexander Szpakowski
eb98e8cc48
Removed unnecessary tabs in empty lines, fixed texture filtering when the minification and mipmap filter are the same
2013-01-07 06:56:59 -04:00
Alexander Szpakowski
8b3fb1d71c
Code cleanup
2013-01-02 17:19:41 -04:00
Alexander Szpakowski
fda16e27cd
Changed image mipmap api: Image:setFilter now takes an optional third argument (mipmap filter mode), Image:get/setMipmapFilter is removed.
2013-01-02 04:21:22 -04:00
Alexander Szpakowski
2739ea561a
Initial image mipmapping implementation. Includes Image:set/getMipmapFilter and Image:set/getMipmapSharpness. setMipMapFilter requires a filter mode, or nil to disable mipmapping.
...
Enabling mipmapping on an image that does not have power-of-two dimensions will raise an error, due to inconsistent support in older graphics chipsets
2013-01-02 02:50:13 -04:00
Alexander Szpakowski
1678252b7a
Applied patch from issue #542 (texture filtering inconsistencies) in main LÖVE repository
2013-01-01 21:29:38 -04:00
Bart van Strien
d24c0344c8
Make second argument to setDefaultImageFilter Image:setFilter and Image:setWrap optional, and default to the first
2012-11-18 19:18:37 +01: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
Bill Meltsner
be55579a22
Happy New Year, have an enormous diff
2012-01-09 02:41:11 -06: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
vrld
48137cd2e1
Fix Issue #278 : Set default filter mode for new images.
...
Add the somewhat lengthy named love.graphics.getDefaultImageFilter() and
love.graphics.getDefaultImageFilter(). The verbose name should point to the
fact that changing the default filter midway through the game will not affect
the images already loaded using love.graphics.newImage().
2011-10-07 14:44:17 +02:00
Bill Meltsner
fde708160e
bringing in the new year by changing every 2010 to 2011
2011-01-15 14:40:27 -06:00
Bill Meltsner
0e6e7c6c03
Cleaned up getting wrap and filter modes for Images.
2010-04-11 23:09:53 -04:00
Bill Meltsner
db117de2c8
Switched Image wrap modes to the new string syntax too.
2010-02-09 15:18:27 -05:00
Bill Meltsner
e661459103
Switched Image filter modes to use the new string constant system
2010-02-09 14:30:41 -05:00
rude
aa01c984b9
Updated all dates to 2010.
2010-01-31 16:54:47 +01:00
rude
dd420d68a3
Ok, project generation didn't really work out. Reverted.
2009-08-10 21:33:07 +02:00
rude
ba1a75e547
Added many comments, and changed function names for wrapper functions.
2009-08-09 21:08:55 +02:00
rude
410dfc0627
Exposed new functions in Image.
2009-07-26 23:25:11 +02:00
rude
e0115a384e
Moved most constants into relevant classes.
2009-07-26 23:05:26 +02:00