Commit Graph

1906 Commits

Author SHA1 Message Date
Alex Szpakowski d5096840ba Fixed Canvas:clear not working properly with antialiased Canvases 2014-03-02 15:49:29 -04:00
Alex Szpakowski a3afb1a9ca Refactored the ImageData decoding/encoding backends a bit 2014-03-02 03:17:47 -04:00
Alex Szpakowski 55514720a6 Fixed some minor compiler warnings 2014-03-01 21:16:01 -04:00
Alex Szpakowski ec0f428c4f Cleaned up the code for initializing love.filesystem and the source and save directories a bit 2014-03-01 20:23:04 -04:00
Alex Szpakowski ecf37320a9 Changed love.graphics.newMesh, Mesh:setVertex, and Mesh:setVertices to default the u,v arguments to 0,0 instead of requiring them 2014-02-27 05:38:46 -04:00
Alex Szpakowski fe5e7c17e7 Added Body:setUserData and Body:getUserData (resolves issue #853_ 2014-02-26 20:47:05 -04:00
Alex Szpakowski 94aa39116e Fixed stencils used when an antialiased Canvas is active 2014-02-16 14:54:33 -04:00
Bart van Strien e92be92900 Add fused and version flags to love manpage 2014-02-16 13:19:59 +01:00
Bart van Strien c2971f9568 Distribute associations, icons and manpages in the deb package 2014-02-16 09:59:27 +01:00
Alex Szpakowski 2a19a4444e Allow Fixture:setUserData and Fixture:getUserData to be called in coroutines (resolves issue #850.)
Bad things will still happen if you call them from a love Thread which didn't create the World and the Fixture object. Don't do it!
2014-02-15 20:59:57 -04:00
Alex Szpakowski 31134ada13 Updated changelog 2014-02-13 19:59:35 -04:00
Alex Szpakowski 6259e38d84 Meshes will now use the smallest integer data type possible for index buffer (vertex map) values, instead of always using 32-bit integer numbers. 2014-02-12 02:22:57 -04:00
Alex Szpakowski c17cada9e0 Fixed World:getBodyList, World:getJointList, and World:getContactList causing hard crashes instead of Lua errors 2014-02-10 14:01:59 -04:00
Alex Szpakowski 0e28a9d01b Added a header guard for luasocket's lua.h wrapper 2014-02-10 02:32:24 -04:00
Alex Szpakowski d07e31370d Added RandomGenerator:getState and RandomGenerator:setState (resolves issue #831.)
getState returns an implementation-dependent string representing the current state of the RandomGenerator's PRNG. setState sets the PRNG's state to an implementation-dependent string.
2014-02-08 20:28:41 -04:00
Alex Szpakowski de1f105e40 the AL_SOFT_direct_channels OpenAL extension shouldn't be required for compilation 2014-02-08 02:43:13 -04:00
Alex Szpakowski 615492540d Added ParticleSystem:setRelativeRotation. If enabled, particle rotations and angles will be relative to their current velocities. 2014-02-06 05:46:47 -04:00
Alex Szpakowski 4edebe1789 Updated changelog 2014-02-05 02:21:16 -04:00
Alex Szpakowski e54d771be4 Added love.math.gammaToLinear and love.math.linearToGamma for converting RGB color values from the sRGB color-space to linear and vice-versa. 2014-02-04 19:45:50 -04:00
Alex Szpakowski 823b1babc8 Specifying the srgb window flag should now cause it to fall back to srgb=false in all situations if an srgb-capable system framebuffer isn't supported, instead of failing to create the window 2014-02-04 02:02:54 -04:00
Alex Szpakowski b625bb6624 moved Mesh:setWireframe to love.graphics.setWireframe (affects all draws until it's disabled.)
Wireframe mode should only be used for debugging: the wireframe lines behave differently than regular lines, their widths aren't affected by the graphics scale, and the mode isn't available on OpenGL ES.
2014-02-03 04:59:58 -04:00
Alex Szpakowski ce4fdf4ac9 Added sRGB (gamma-correct) support for Images, Canvases, and the main screen.
love.graphics.newImage(path, “srgb”) creates a new Image whose texels are treated as being in the sRGB color space, so they are linearized when drawing/sampling from the image.

love.graphics.newCanvas(w, h, “srgb”) creates a new Canvas whose texels are treated as being in the sRGB color space, so drawing to the Canvas does a linear->sRGB conversion (but blends linearly), and sampling from it (drawing it or using it in a shader) converts from sRGB to linear space.

The "srgb" window flag does the same as Canvases for the main screen.
2014-02-02 18:31:41 -04:00
Alex Szpakowski 9e746c56fa love.graphics.getBlendMode no longer does several glGetInteger function calls 2014-01-30 21:51:17 -04:00
Alex Szpakowski 40242689b1 Fixed rendering to multiple canvases, removed some redundant OpenGL calls when switching between canvases 2014-01-30 21:09:13 -04:00
Alex Szpakowski 2a4d47e614 Added a missing newline to a print statement 2014-01-29 23:10:57 -04:00
Alex Szpakowski 33f12a6091 Source:play now returns false if alSourcePlay failed 2014-01-29 17:04:03 -04:00
Alex Szpakowski 007d0d5216 Windows: create the console before modules are loaded (allows information printed during module initialization to be displayed.) 2014-01-29 16:20:05 -04:00
Alex Szpakowski a49c2a88c1 Increased robustness of audio module initialization (see issue #646.) Also changed Source:play to return a boolean indicating success. 2014-01-29 05:24:47 -04:00
Alex Szpakowski 7ef0a6b576 Updated changelog 2014-01-28 03:27:42 -04:00
Alex Szpakowski a7ed581204 Reverted ParticleSystem:setPosition’s functionality to 0.9.0’s beheaviour, added ParticleSystem:moveTo which has the new behaviour (new particles spawn in a line between the old position and where the emitter was moved to.) 2014-01-28 03:20:08 -04:00
Alex Szpakowski 6b538b5827 The emission rate for ParticleSystems is no longer restricted to integer numbers. 2014-01-27 23:42:26 -04:00
Alex Szpakowski d70023e350 Enable OpenGL’s debug output when the LOVE_GRAPHICS_DEBUG environment variable is ‘1’. Resolves issue #607. 2014-01-27 23:30:16 -04:00
Alex Szpakowski a2a8b14cfd Added love.getVersion (resolves issue #809).
Syntax is: major, minor, revision, codename = love.getVersion().
2014-01-27 19:24:14 -04:00
Alex Szpakowski 0f9bf64cf8 Xcode project: added new build scheme ‘Distribution’, moved LTO from ‘Release’ to ‘Distribution’ 2014-01-27 19:04:12 -04:00
Alex Szpakowski 0da21a430a Mac: enabled link-time optimization for Release builds of love 2014-01-27 18:44:00 -04:00
Alex Szpakowski c5c788e976 Added a built-in variable readable in shaders: ‘love_ScreenSize’. Its x and y components contain the width and height of the current viewport. Resolves issue #841. 2014-01-27 02:58:34 -04:00
Alex Szpakowski 3a24e73891 0.9.1’s API is designed to be backwards-compatible with 0.9.0 games (resolves issue #839) 2014-01-27 02:28:38 -04:00
Alex Szpakowski 988404e4ca Added love.graphics.getSystemLimit (resolves issue #840). Deprecated love.graphics.getMaxPointSize.
love.graphics.getSystemLimit currently accepts these enum strings: “pointsize”, “texturesize”, “multicanvas”, and “canvasfsaa”.
2014-01-27 02:19:30 -04:00
Alex Szpakowski 7556fde5e6 Added antialiasing (MSAA) support to Canvases via a new optional parameter. Added Canvas:getFSAA. 2014-01-27 01:31:41 -04:00
Alex Szpakowski 10f1e23931 Increased version to 0.9.1 2014-01-22 18:26:10 -04:00
Alex Szpakowski ba7e69d776 Added Mesh:setDrawRange(min, max) and Mesh:getDrawRange().
If no vertex map is set, this restricts the drawn vertices to those whose indices in the vertex array are between [min, max] inclusive.
If a vertex map is set, this restricts the values used in the vertex map to those whose indices in the vertex map array are between [min, max] inclusive.

Added Mesh constructor variant: love.graphics.newMesh(vertexcount, texture, drawmode). Creates a Mesh with a certain number of vertices with x,y,u,v,r,g,b,a values of (0,0,0,0,255,255,255,255).
2014-01-21 06:16:47 -04:00
Alex Szpakowski 73f1ce0d40 Added instancing support to Meshes via Mesh:setInstanceCount. Added a new built-in variable to vertex shaders: int love_InstanceID.
love.graphics.draw(mesh) will draw the mesh instancecount times, using hardware instancing when available. The only way to draw individual instances differently from each other is to use the love_InstanceID variable in a vertex shader.

Added love.graphics.isSupported(“instancing”). Hardware instancing is supported if true, otherwise a (slower) pseudo-instancing fallback is used internally when drawing instanced meshes.
2014-01-21 06:01:50 -04:00
Alex Szpakowski 81d9810ed8 Fixed t.window.highdpi in love.conf, updated the nogame screen to look slightly better on retina displays 2014-01-18 00:41:02 -04:00
Alex Szpakowski 0e13975c11 Improved some error message text 2014-01-17 22:28:06 -04:00
Alex Szpakowski ad65b577be Updated changelog 2014-01-17 22:00:50 -04:00
Alex Szpakowski 50b7bdcea9 And another typo… 2014-01-17 21:17:11 -04:00
Alex Szpakowski 0d52ac6d52 Fixed dumb typo 2014-01-17 21:12:30 -04:00
Alex Szpakowski 309193895a Added opt-in support for high-dpi mode in OS X when on a retina display (resolves issue #761).
Added a ‘highdpi’ boolean flag to t.window/love.window.setMode (defaults to false.)
When the window is actually in high-dpi mode on a supported display, the graphics width and height and the mouse position are in pixels, rather than ‘window coordinates’.

Added love.window.getPixelScale. Returns the scale factor of the window from user-space points to pixels (e.g. it will be 1 normally, and 2 on a retina display in OS X with high-dpi mode enabled.)
2014-01-17 21:11:20 -04:00
Alex Szpakowski 29f47d9a10 Changed particle spawning behaviour in ParticleSystems to spawn at an interpolated position between the location at the previous update and the current one. This results in much smoother behaviour when moving a ParticleSystem constantly via ParticleSystem:setPosition.
Also fixed particle spawning to better fill up the buffer.
2014-01-16 16:20:30 -04:00
Alex Szpakowski dc35db1c7b Fixed tab characters (‘\t’) in text to be drawn properly with love.graphics.print. 2014-01-15 23:38:39 -04:00