Alex Szpakowski
9d62d0044c
Macro hard, microsoft
2013-04-19 16:11:39 -03:00
Alex Szpakowski
426ca03315
Added ParticleSystem:setLinearAcceleration(xmin, ymin, xmax, ymax) and removed ParticleSystem:setGravity (issue #599 )
2013-04-19 15:33:30 -03:00
Alex Szpakowski
b6247f9ae1
Added many getters of questionable utility to ParticleSystems.
...
Storing your own values is blasphemy, clearly.
2013-04-18 04:54:53 -03:00
Alex Szpakowski
bf6d1c258b
Misc. code cosmetics and improvements
2013-04-18 02:14:35 -03:00
Alex Szpakowski
6fd3038405
Improved clarity/readability of internal OpenGL state shadowing functions
2013-04-17 01:06:33 -03:00
Alex Szpakowski
2d0b3b5226
ParticleSystems now use their own RNG instead of the global one (prevents ParticleSystems from modifying the global math.random state)
...
--HG--
branch : math-randobject
2013-04-15 15:11:06 -03:00
Alex Szpakowski
d98e2cb40c
Renamed randnormal to randomnormal
...
--HG--
branch : math-randobject
2013-04-15 14:57:20 -03:00
Alex Szpakowski
6a27e1aa2f
Ensure the current color is set properly after drawing particlesystems and spritebatches
2013-04-12 15:40:53 -03:00
Alex Szpakowski
3edf033498
Internally keep track of the value of the current color (issue #564 )
2013-04-12 15:24:21 -03:00
Alex Szpakowski
7391d9821f
Merged love.graphics.origin into default (issue #124 )
2013-04-11 17:59:32 -03:00
Alex Szpakowski
c7838b78b6
Added love.graphics.setAlphaTest (issue #534 )
2013-04-10 13:17:54 -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
c215541d6c
Merged mage-CompressedData into default
2013-04-09 23:44:00 -03:00
Alex Szpakowski
b59b967f6b
Fixed a memory leak in Canvas:getImageData() (issue #590 )
2013-04-09 14:08:05 -03:00
Alex Szpakowski
1b80853118
Fixed an OpenGL error when MSAA isn't supported
2013-04-09 10:57:43 -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
299ee64320
Added Image:isCompressed()
...
--HG--
branch : image-CompressedData
2013-04-07 23:11:11 -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
1c720afaf8
Cleaned up some shader code internals
2013-04-06 14:14:11 -03:00
Alex Szpakowski
cfe6014b68
Improved shader:getWarnings() to return shader compiler warnings as well as shader program linker and usage warnings
2013-04-06 14:02:24 -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
7e658861d7
love.graphics.drawq's x,y parameters are now optional, to match love.graphics.draw
2013-04-01 16:47:45 -03:00
Alex Szpakowski
d5aa807747
More internal code cleanup
2013-03-31 19:02:27 -03:00
Alex Szpakowski
eef4eed636
Cleaned up some Lua binding code
2013-03-31 04:55:03 -03:00
Alex Szpakowski
ab3302e969
Updated GLee with opengl 4.3 and recent extension definitions
2013-03-31 00:31:21 -03:00
Alex Szpakowski
23a0f3a69c
Merged love-experiments/love.graphics.setColorMask into default
2013-03-27 19:43:04 -03:00
Alex Szpakowski
7b8884965e
Added ParticleSystem:emit(num) (issue #577 )
2013-03-27 01:09:53 -03:00
Alex Szpakowski
702f9515d8
Merged bartbes/love-experiments/MRTs into default
2013-03-26 23:41:46 -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
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
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
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
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
e8c6a3f77c
Slightly improved error messages when love.graphics.newShader fails
2013-03-16 12:49:46 -03: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