Commit Graph

2404 Commits

Author SHA1 Message Date
Alex Szpakowski a35ccb4426 Added Font:setFallbacks(otherfont, ...). Resolves issue #1041.
Note that general font metrics are largely still based on the original (non-fallback) font, whereas glyph sizes are based on the fallback fonts when those are used to get the glyph.
2015-05-02 18:07:35 -03:00
Alex Szpakowski 4e1011a52e Re-added Mesh:setVertices. 2015-05-02 14:05:29 -03:00
Alex Szpakowski eee1fbac79 love.filesystem is now loaded by default in threads (see issue #1040.) 2015-05-01 21:20:23 -03:00
Alex Szpakowski 34bf847913 Removed redundant definition of ChainShape:getChildCount. 2015-04-27 19:08:02 -03:00
Alex Szpakowski 6e92bd8302 Improved the argument type checking for World:setCallbacks, World:setContactFilter, World:queryBoundingBox, and World:rayCast. 2015-04-27 18:48:13 -03:00
Alex Szpakowski 90a3c2b8ba Added Text:setFont. 2015-04-27 04:19:03 -03:00
Alex Szpakowski f29567160a Fixed love.audio.stop() not rewinding streaming Sources. 2015-04-26 21:22:04 -03:00
Alex Szpakowski 33e1d2736d Removed restrictions preventing sRGB and non-sRGB canvases from being used together when doing multi-canvas rendering. 2015-04-25 21:32:10 -03:00
Alex Szpakowski 5c49898cdf Fixed lines drawn using the 'none' line join mode having missing sections of each line segment. 2015-04-25 18:56:47 -03:00
Alex Szpakowski 8e42f591ce Updated the iOS xcode project search paths for the luajit headers and static library. 2015-04-25 12:00:07 -03:00
Alex Szpakowski e7f56241ec Removed the callback argument from love.filesystem.getDirectoryItems (resolves issue #877.)
Cleaned up the getDirectoryItems ccde to no longer call Lua API functions from Filesystem.cpp (now it's all in wrap_Filesystem.cpp.)
2015-04-25 00:16:10 -03:00
Alex Szpakowski 289eeb4fe0 Added Channel:performAtomic(func, ...). Resolves issue #1034.
performAtomic calls the function and passes the Channel as the first argument, plus any additional specified arguments. The called function should do as little work as possible.

To other threads, all methods for that Channel are executed in a single step inside the function. This can prevent a large number of potiential race conditions.

Example:

-- main.lua:
local function set(channel, value)
    channel:clear()
    channel:push(value)
    return "set value"
end

assert(channel:performAtomic(set, 1) == "set value")

-- thread.lua
while true do
    assert(channel:peek() == 1)
end
2015-04-24 23:53:28 -03:00
Alex Szpakowski 97806f87c0 Replaced Simplex noise with Perlin noise for the 3D and 4D variants of love.math.noise, to avoid patent-infringement issues (resolves issue #997.) 2015-04-17 17:01:41 -03:00
Alex Szpakowski c62b005ff3 Changed the default mipmap filter to be 'linear' instead of 'nearest'. 2015-04-13 12:51:48 -03:00
Alex Szpakowski d8a68d6ce1 Updated iOS-specific graphics code to use the latest SDL changes. 2015-04-13 12:26:54 -03:00
Alex Szpakowski 2a482f8e98 Updated stb_image to version 2.0.3. 2015-04-12 15:48:25 -03:00
Alex Szpakowski f2ab02da13 Mostly fixed the precision of love's uniform matrices not matching between shader stages in OpenGL ES. 2015-04-10 13:00:36 -03:00
Alex Szpakowski 4c9b2105cd Updated the changelog 2015-04-08 22:44:16 -03:00
Alex Szpakowski 2844499ef7 Added the ability to have custom vertex attributes in Meshes (resolves issue #768.)
Added new love.graphics.newMesh variants: newMesh(vertexformat, vertices [, drawmode, meshusage]) and newMesh(vertexformat, numvertices [, drawmode, meshusage]).

Replaced the regular love.graphics.newMesh variants with newMesh(vertices [, drawmode, meshusage]) and newMesh(numvertices [, drawmode, meshusage]). To use an image or canvas with a mesh, use Mesh:setTexture.

vertexformat is a table with the following prototype:
{
  {attributename, datatype, components},
  {attributename, datatype, components},
  ...
}

Where attributename is the name of the vertex attribute (can be the built-in names 'VertexPosition', 'VertexTexCoord', or 'VertexColor', or a custom name for use in a vertex shader), datatype is the type of values used for the attribute ('float' or 'byte'), and components is the number of components in the vertex attribute (between 1 and 4.)

The vertex format is used to determine the layout of the vertices in the mesh, for example the 'regular' newMesh variants use this vertex format:
format = {
  {"VertexPosition", "float", 2},
  {"VertexTexCoord", "float", 2},
  {"VertexColor", "byte", 4},
}

The mesh usage parameter accepts the same constants as the spritebatch usage hint in love.graphics.newSpriteBatch - "dynamic", "static", and "stream".

Mesh:setVertex now sets *all* vertex attributes for a specific vertex in the Mesh.

Added Mesh:setVertexAttribute(vertexindex, attributeindex, attributevalue1, ...), which sets the values for a specific vertex attribute in a specific vertex in the Mesh (resolves issue #784.)

Added Mesh:getVertexFormat and Mesh:flush.

Added Mesh:setAttributeEnabled(attributename, enable) and Mesh:isAttributeEnabled(attributename), to enable or disable the use of a specific attribute when drawing the Mesh.

Added Mesh:attachAttribute(attributename, mesh), which makes the Mesh use a vertex attribute from another mesh when drawing the Mesh. This can be used to separate out vertex attributes which are updated at different rates into different meshes, and to share vertex data between multiple meshes.

Removed Mesh:setVertices, Mesh:getVertices, and Mesh:setVertexColors.
2015-04-08 22:24:17 -03:00
Alex Szpakowski f8ff50cfde Fixed Image:refresh for sRGB images when OpenGL ES 2 is being used. 2015-04-05 17:35:19 -03:00
Alex Szpakowski cf0968fc6d Avoid some VC++ compiler warnings 2015-04-02 00:28:09 -03:00
Alex Szpakowski 2a6bffaa5a Prevent sRGB and non-sRGB Canvas formats from being used together in multi-canvas rendering (MRTs), due to driver bugs. 2015-03-29 23:51:08 -03:00
Dermoumi Sid 6a07823224 Fixed shearing resetting transformations 2015-03-29 12:37:18 +01:00
Alex Szpakowski a17fed2a1e Fixed utf8.char. 2015-03-28 13:44:39 -03:00
Alex Szpakowski 3aafab9607 Hopefully fixed compilation in Windows. 2015-03-26 22:16:17 -03:00
Alex Szpakowski cffa899e03 Explicitly mention SDL in the error message caused by SDL subsystem initialization failure. 2015-03-26 14:51:47 -03:00
Alex Szpakowski 86d41620dd Replaced the mouse button constants ("l", "r", "m", etc.) with button numbers. 1 is the primary button, 2 is the secondary button, 3 is middle-mouse, etc. Resolves issue #1019. 2015-03-25 00:31:16 -03:00
Alex Szpakowski 78dd8bc547 Added love.touch.getPressure(touchid). Not useful on most touch-capable devices, but I do expect Apple's Force Touch to make it into iPhones in the near future. 2015-03-24 20:45:21 -03:00
Alex Szpakowski b8cb16dc95 Updated changelog 2015-03-23 13:43:11 -03: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 4d92d00aff Fixed compilation on OSX/Windows/iOS 2015-03-23 00:24:06 -03:00
Bart van Strien 37f04a7f3d Set LOVE_LINUX when compiling under BSD (see issue #867)
Not technically correct, but it seems to be working, sample size 1.
2015-03-22 19:57:00 +01:00
vrld f32d770cf6 Add BezierCurve:getSegment(t1, t2)
Returns a BezierCurve that corresponds to the curve-segment between t1 and t2
on the original curve.
2015-03-22 19:22:18 +01:00
vrld f7cb16be87 Merged in muddmaker/love-render-curve-segment (pull request #39)
Add BezierCurve:renderSegment
2015-03-22 19:16:24 +01:00
muddmaker 8ee2db3420 Fix typos 2015-03-22 10:16:12 -07:00
Bart van Strien cb02452c08 Verify both platform and endianness have been determined in configuration 2015-03-22 14:26:25 +01:00
muddmaker 3a54d4599a fix conflicts 2015-03-21 18:15:41 -07:00
Bart van Strien 95d9dfa801 Explicitly search for pkg-config in configure script 2015-03-21 21:49:17 +01:00
Alex Szpakowski e237ed2432 love.graphics.discard now accepts a table of booleans indicating which of the active canvases to discard (matches love.graphics.clear.) 2015-03-21 02:36:13 -03:00
Alex Szpakowski 163d059305 Moved most of the love.timer code out of the sdl implementation folder. 2015-03-20 00:55:14 -03:00
Alex Szpakowski d31168c0e0 Cleaned up some graphics code. 2015-03-20 00:16:36 -03:00
Alex Szpakowski 7741adc7b4 Switched back to zlib decompression for PNG images and fixed a memory leak issue when decompressing. 2015-03-19 17:08:44 -03:00
Alex Szpakowski 5138acaee5 Temporarily disabled zlib decompression for PNG images, in favour of LodePNG's built-in decompression code. 2015-03-19 14:41:15 -03:00
djcj 9d2a2832ab Disable static libraries by default in linux build 2015-03-18 11:28:01 +00:00
Alex Szpakowski a36dbc3d49 Only update the shader point size in OpenGL ES 2 when it's been modified, rather than before every draw. 2015-03-17 17:24:45 -03:00
Alex Szpakowski 4a8e5bd4db Avoid non-ASCII UTF-8 in message box text - SDL's X11 backend for message boxes doesn't properly support it yet (https://bugzilla.libsdl.org/show_bug.cgi?id=1658). 2015-03-17 11:54:52 -03:00
Alex Szpakowski d982f02634 Renamed File:eof to File:isEOF (closes issue #683.) 2015-03-17 01:13:29 -03:00
Alex Szpakowski 06ef263537 Added OpenGL debug groups for most graphics operations when love is built in debug mode for iOS. The Xcode frame capture tool uses them to create nice visual groups for OpenGL function calls. 2015-03-16 22:55:58 -03:00
Alex Szpakowski 14cbc91e7f Fixed a memory leak in love.graphics.newText. 2015-03-16 03:13:10 -03:00
Alex Szpakowski d00773b974 Updated GLAD for the latest GL and GLES extensions. 2015-03-15 23:45:08 -03:00