Alex Szpakowski
fa799227a2
Fixed SoundData:getDuration
2013-03-26 19:45:32 -03:00
Alex Szpakowski
a55c7e871e
fixed canvas:clear() when multi-canvas rendering is active, changed some names and wording
...
--HG--
branch : MRTs
2013-03-26 04:58:43 -03:00
darthfodder
11dc74c7db
Add SoundData:getSampleCount() function
...
Adds SoundData:getSampleCount(), calculates how many samples there are
in this particular SoundData. resolves #578
--HG--
branch : sounddata-samplecount
2013-03-25 22:04:39 -07:00
darthfodder
275a144907
Remove commented out line
2013-03-25 20:43:51 -07:00
Alex Szpakowski
6c5daab312
Fixed up the API: setCanvas (singular) now only takes one canvas, setCanvases must be used for multi-canvas rendering
...
--HG--
branch : MRTs
2013-03-25 21:23:09 -03: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
3fcb2201bc
Fixed love.graphics.newFont using the wrong texture format when creating its glyph texture
2013-03-24 23:43:36 -03:00
Alex Szpakowski
2ea065c68b
Added MRT support to canvases via love.graphics.setCanvases(c1, c2, ...), and an 'effects' callback function in shaders.
...
- Simultanious rendering to multiple canvases requires all canvases to be the same size (limitation of pre-GL3.0 framebuffers)
- love.graphics.isSupported("mrtcanvas") was added
- love_Canvases[n] (0-based array of active canvases) can be written to in pixel shaders in the 'effects' callback function
- everything drawn to multiple canvases at once will be duplicated to all canvases if no shader is active or the standard 'effect' shader function is used
--HG--
branch : MRTs
2013-03-24 02:20:15 -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
7e753a0acb
Renamed love.graphics.setDefaultImageFilter to love.graphics.setDefaultFilter
2013-03-21 11:27:40 -03: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
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
9e9eb42f1d
Fixed filedata not being cleaned up when love.image.newImageData(filepath) fails
2013-03-19 09:01:15 -03:00
Alex Szpakowski
f3290d84b7
Improved error handling and error messages when love.graphics.newShader fails
2013-03-18 22:55:41 -03:00
Alex Szpakowski
288971a3ad
Added all standard optional draw parameters to love.graphics.printf: angle, sx, sy, ox, oy, kx, and ky
2013-03-18 16:15:21 -03:00
Alex Szpakowski
991b15d670
More renaming of "fragment" to "pixel"
2013-03-18 04:07:18 -03:00
Alex Szpakowski
07ba81f060
Renamed all cases of "fragment shader" to "pixel shader"
2013-03-17 18:11:41 -03:00
Alex Szpakowski
2838208338
Cleaned up love.filesystem.load and love.filesystem.getLastModified code
2013-03-17 13:43:07 -03:00
Alex Szpakowski
a2cb35f4e3
Constified some Filesystem module methods
2013-03-17 03:54:11 -03:00
Alex Szpakowski
129ae0f4eb
Added love.filesystem.append (issue #541 )
2013-03-17 03:40:13 -03:00
Alex Szpakowski
96229bcb5d
Cleaned up love.filesystem.read/write code
2013-03-17 03:30:36 -03:00
Alex Szpakowski
8d4f35b86b
Added love.filesystem.getSize (issue #541 )
2013-03-17 01:56:24 -03:00
Alex Szpakowski
e8c6a3f77c
Slightly improved error messages when love.graphics.newShader fails
2013-03-16 12:49:46 -03:00
vrld
db86fa4b83
Make love.math.triangulate with any polygon winding order.
2013-03-14 17:21:13 +01:00
Alex Szpakowski
d39cfbb4fa
Really fixed love.graphics.rectangle
2013-03-13 22:12:35 -03:00
Alex Szpakowski
7229dcae9f
Fixed love.graphics.rectangle
2013-03-13 22:03:42 -03:00
vrld
1a407a6af3
Make non-gcc compilers happy...
2013-03-13 23:09:25 +01:00
vrld
ece4ff6472
Make love.math a singleton. Remove code duplication. Add love.math.triangulate.
...
love::math::Math is now a singleton, so other modules can use it via
love::math::Math::instance.
Removed duplicate implementations of various rng helper functions.
ParticleSystem now uses love::math::Math's RNG.
New function: love.math.triangulate(vertices)
Accepts a table or list of x/y coordinate pairs and returns a table of tables.
The inner tables are the triangles the polygon is composed of.
Works on all *simple* polygons, i.e. a closed chain of vertices that does not
intersect itself. Attempting to triangulate non-simple polygons is undefined
behavior - in the best case it throws an error, in the worst case it returns
an invalid triangulation.
Polygons must be ordered in *clockwise order* with respect to the love
coordinate system. Attempting to triangulate a ccw polygon will throw an
error.
Examples:
triangles = love.math.triangulate(0,0, 1,1, 2,0, 2,2, 0,2)
triangles == {
{1,1, 2,0, 2,2},
{1,1, 2,2, 0,2},
{1,1, 0,2, 0,0},
}
triangles = love.math.triangulate({0,0, 1,1, 2,0, 2,2, 0,2})
-- same as above
triangles = love.math.triangulate(0,2, 2,2, 2,0, 1,1, 0,0)
-- error - polygons is in counterclockwise order
triangles = love.math.triangulate(0,0, 1,3, 2,0, 2,2, 0,2)
-- undefined behavior - polygon intersects itself (because of edge 1,3)
2013-03-13 20:48:39 +01:00
Alex Szpakowski
d383434edf
ParticleSystem:setColors now accepts multiple color arrays (issue #440 )
2013-03-13 14:38:58 -03:00
Alex Szpakowski
b8ec6633ab
Fixed love.graphics.printf wrapping when the wrap limit is the same as the text width (issue #558 )
2013-03-13 00:08:09 -03:00
Alex Szpakowski
1172d5b836
love.graphics.newScreenshot now uses the size of the current canvas (if applicable), instead of adding transparency or clipping to match the screen size
2013-03-12 20:52:24 -03:00
Alex Szpakowski
d39bb315af
love.graphics.newScreenshot replaces alpha with full opacity by default (issue #374 , thanks Boolsheet)
...
Some additional overhead was added to newScreenshot because it doesn't use glPixelTransfer (not supported in ES2 / core GL3+, and like all GL functions has the slight potential to be buggy on some drivers). This choice might be revisited in the future.
2013-03-12 20:48:40 -03:00
Alex Szpakowski
e869b71c43
Fixed crash in ImageData:paste
2013-03-12 17:16:39 -03:00
Alex Szpakowski
94f140454f
More Quad code cleanup
2013-03-11 22:46:25 -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
4704c4e19e
Cleaned up some ParticleSystem and Quad code
2013-03-11 17:56:55 -03:00
Alex Szpakowski
ce71bc0847
Fixed love.timer.step / dt
2013-03-11 02:00:25 -03:00
Alex Szpakowski
6a83eba5f2
Merged love-experiments/particlesystem-quads into default
2013-03-11 01:53:49 -03:00
Alex Szpakowski
318f335c7c
ParticleSystem:setQuads can now accept a table argument, cleaned up the ParticleSystem quad code
...
--HG--
branch : particlesystem-quads
2013-03-11 01:44:43 -03:00
Bart van Strien
7efe11b11f
Add centered flag to setMode, optionally centers the window (on by default, as before) (issue #463 )
2013-03-10 23:00:31 +01:00
Bart van Strien
63c57ba3f8
Make love.timer.getFPS and love.timer.getAverageDelta microsecond-accurate
2013-03-10 22:16:23 +01:00
Bart van Strien
28af989a00
Add love.timer.getAverageDelta (issue #570 ) and constify love.timer.sleep
2013-03-10 22:07:24 +01:00
Alex Szpakowski
d30809ebff
Added ParticleSystem:setQuads(q1, q2, ...), quads are chosen based on current particle lifetime in a similar style to ParticleSystem:setColors
...
--HG--
branch : particlesystem-quads
2013-03-10 03:40:25 -03:00
Alex Szpakowski
738f471978
Fixed shader creation
2013-03-07 17:47:40 -04:00
Alex Szpakowski
6f67fbdfa7
Fixed a typo in joystick event code
2013-03-06 11:17:39 -04:00
Alex Szpakowski
3c8bc9ee9f
Merged bartbes/love-experiments/joystickevents into default
2013-03-05 13:59:45 -04:00
Alex Szpakowski
6b1222366d
Removed 'moved' suffix from new joystick callbacks
...
--HG--
branch : joystickevents
2013-03-05 12:31:11 -04:00
Alex Szpakowski
974d63124e
Removed redundant code in the event module
2013-03-04 19:05:57 -04:00
Alex Szpakowski
a844ac2389
Added love.joystickaxismoved, love.joystickballmoved, and love.joystickhatmoved callbacks
...
--HG--
branch : joystickevents
2013-03-04 18:49:25 -04:00