Commit Graph

96 Commits

Author SHA1 Message Date
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01:00
Alex Szpakowski 9bae1f01ba Update lodepng. 2017-12-17 21:56:17 -04:00
Alex Szpakowski cdcf052a73 Update LZ4. 2017-12-17 21:52:19 -04:00
Alex Szpakowski f69affebc9 Update tinyexr. 2017-12-17 21:42:04 -04:00
Alex Szpakowski 487c17d1d8 Attempt to fix compilation with gcc. 2017-12-17 21:16:11 -04:00
Alex Szpakowski 54c09c910a Update glslang. 2017-12-17 21:05:40 -04:00
Alex Szpakowski 1d8a3326b3 Include the physfs 3.0.1 source in love. 2017-12-15 19:41:17 -04:00
Bart van Strien 3278ea5580 Fix compilation with lua 5.2 and 5.3
Mostly to have the lua53 "library" work with both lua 5.1 and lua 5.3.
Additionally fixes two other incompatibilities.

--HG--
branch : minor
2017-09-25 10:27:12 +02:00
Alex Szpakowski 90e86c329d Add love.data module.
- Moved love.math.compress / decompress / decode / encode / hash to love.data.
- Changed love.data.compress/decompress to take the format argument first instead of second.
- Added love.data.newDataView. Returns a read-only subsection of an existing Data object.
- Added love.data.newByteData. Mostly useful in combination with LuaJIT's FFI as it has no extra methods currently.
- Added implementations of Lua 5.3's data packing APIs: love.data.packString / packData / unpack / getPackedSize.

Resolves issue #1336.
Resolves issue #1331.

--HG--
branch : minor
2017-09-24 19:25:27 -03:00
Alex Szpakowski d1d6fb6f68 Update stb_image from 2.12 to 2.16.
--HG--
branch : minor
2017-07-23 18:44:08 -03:00
Alex Szpakowski 72ba5080fb Update license.txt and relicense my .dds file parser code
--HG--
branch : minor
2017-07-23 00:28:25 -03:00
Alex Szpakowski ad399cab39 Update glslang
--HG--
branch : minor
2017-06-11 14:35:51 -03:00
Alex Szpakowski 73fd45558b Implement Array, Cubemap, and Volume texture types (issue #1111).
- Add love.graphics.newArrayImage, newCubeImage, and newVolumeImage.
- Add love.graphics.newCanvas(w, h, layers) and newCanvas(w, h, layers, settings). Add ‘type’ field to the settings table of newCanvas.

- Add new love.graphics.setCanvas variants: setCanvas(canvas, slice), and setCanvas(canvastable) where canvastable is in the format: {{canvas1, layer=2}, {canvas2, face=5}}

- Add Texture:getTextureType, getDepth, getLayerCount, getMipmapCount, and getFormat.

- Remove Image:getData and Image:refresh.
- Add Image:replacePixels(imagedata [, slice] [, mipmap]).

- Update Canvas:newImageData to accept a slice argument.

- Add love.image.newCubeFaces(imagedata).

--HG--
branch : minor
2017-02-20 14:58:13 -04:00
Alex Szpakowski e360346c21 Fix Windows build
--HG--
branch : minor
2017-01-22 23:39:32 -04:00
Alex Szpakowski 731b5d5cf0 Added support for GLSL 3 shaders (GLSL 3.30 and GLSL ES 3.00).
To use GLSL 3 in a shader, the first line of the shader has to be: #pragma language glsl3

glsl1 is the default language.

Added “glsl3” graphics feature as part of the table returned by love.graphics.getSupported().

Added love.graphics.validateShader(boolean gles, shadercode). It returns a boolean along with an error string if the shader code has errors for its target language and platform (gles or desktop).

Implemented support for Core Profile OpenGL 3.3 in love.graphics.

--HG--
branch : minor
2017-01-22 18:54:04 -04:00
Alex Szpakowski a6669a8bb2 Merge default into minor
--HG--
branch : minor
2017-01-21 12:06:35 -04:00
Bart van Strien 2aff0b1199 Remove executable bit from source files 2017-01-15 20:21:38 +01:00
Alex Szpakowski c5b7a07064 Merge default into minor.
--HG--
branch : minor
2017-01-12 22:52:24 -04:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Bart van Strien 77949030e2 Fix various spelling mistakes (mostly in luasocket)
Thanks to Alexandre Detiste for reporting them
2016-12-21 09:54:37 +01:00
Alex Szpakowski 3e80ec2257 Render pass API. Replaces love.graphics.setCanvas and friends.
- Removed love.graphics.set/getCanvas, Canvas:renderTo, Canvas:newImageData, love.graphics.clear, love.graphics.discard, and love.graphics.newScreenshot.

- Added love.graphics.beginPass and love.graphics.endPass. All rendering must happen within a pass. love.draw is now called while a render pass to the main screen is active.
- Added love.graphics.renderPass, which is a wrapper for begin/endPass which calls the supplied function argument in between a begin/end. This is similar to the old Canvas:renderTo.
- Added love.graphics.isPassActive, getPassCanvases, getPassWidth, getPassHeight, and getPassDimensions.
- Added love.graphics.captureScreenshot.

- Added a new love.run callback love.drawpasses, which is called after love.update and before love.draw. It is the place to render to Canvases using beginPass or renderPass, since love.draw now always draws to the main screen.

- Renamed the ‘canvasswitches’ field in the table returned by love.graphics.getStats to ‘renderpasses’.

love.graphics.beginPass has the following variants (and renderPass mirrors them with an additional function argument at the end):

- love.graphics.beginPass(), begins rendering to the main screen without clearing it.
- love.graphics.beginPass(r, g, b [, a]), begins rendering to the main screen and clears the screen to the specified color.

- love.graphics.beginPass(canvas [, willstencil]), begins rendering to the specified Canvas without clearing it. love.graphics.stencil can only be used within the Canvas if ‘willstencil’ is true.
- love.graphics.beginPass(canvas, r, g, b [, a] [, willstencil]), beings rendering to the specified Canvas and clears it to the specified color. love.graphics.stencil can only be used within the Canvas if ‘willstencil’ is true.

- love.graphics.beginPass(info), where ‘info’ is a table in the following form:
{
    {canvas [, r, g, b, a]}, — A canvas and an optional color to clear the Canvas to when the pass begins.
    {canvas2, [r, g, b, a]}, — Additional Canvases and optional clear colors for multi-canvas rendering.
    …,
    stencil = false, — Optional boolean field to specify whether love.graphics.stencil is allowed within this pass. False by default.
}

The pass info table can be created once up-front and used for multiple beginPass/renderPass calls.

love.graphics.endPass can take an optional callback function argument, which causes endPass to capture the contents of the Canvas drawn to in the render pass to a new ImageData and passes it to the supplied function (this replaces Canvas:newImageData). This does not work on the main screen.

love.graphics.captureScreenshot replaces love.graphics.newScreenshot. It takes a callback function argument which causes love.graphics.present to capture the contents of the screen to a new ImageData and passes it to the supplied function. captureScreenshot can only be called before drawing to the main screen begins in the current frame (e.g. in love.keypressed, love.update, etc.)

--HG--
branch : minor
2016-11-19 19:13:26 -04:00
Bart van Strien 452a8a877e Don't set the enet global when requiring enet
--HG--
branch : minor
2016-11-02 13:08:56 +01:00
James Watkins-Harvey bdc653d9a5 Define LUASOCKET_API macro in header file instead of build time argument
--HG--
branch : minor
2016-10-25 10:34:17 -04:00
Bart van Strien 7a6e626c74 Make stb_image only use SSE2 on x86_64, or when an override has been set (fixes #1173)
Turns out, this is a gcc bug: detecting sse2 support cannot be done in shared
libraries. For now we'll assume 32-bit x86 builds are intended to also run on
devices without SSE2 (how old!). In the future we might decide we only support
machines that support SSE2, if we secretly don't already.
2016-10-25 15:21:31 +02:00
James Watkins-Harvey 8885fc621d Updated luasocket to 3.0rc1 (git commit 316a945)
--HG--
branch : minor
2016-10-01 16:30:53 -04:00
Alex Szpakowski 889aaceabf enet: remove deprecated host:socket_get_address (replaced by host:get_socket_address).
--HG--
branch : minor
2016-10-30 01:08:46 -03:00
Alex Szpakowski 60d90ca4a8 Merge default into minor
--HG--
branch : minor
2016-10-30 01:07:39 -03:00
Alex Szpakowski 27044e6eb8 Update tinyexr.
--HG--
branch : minor
2016-10-18 23:30:52 -03:00
Alex Szpakowski e71f95595c ImageData (and Images loaded from them) now support different data formats. Resolves issue #1048.
Currently exposed formats are rgba8 and rgba16 (normalized), and rgba16f and rgba32f (floating-point). Some systems, especially mobile ones, won't support every format when creating a love.graphics Image. Use love.graphics.getRawImageFormats to check for support.

love.image.newImageData now takes an optional format parameter as its third argument when creating an empty sized ImageData. It defaults to rgba8.

16-bit PNGs, .hdr images, and floating-point OpenEXR images can now be loaded via love.image.newImageData and love.graphics.newImage.

--HG--
branch : minor
2016-05-22 15:28:20 -03:00
Bart van Strien b365574bff Re-apply enet patch to use autoconf results 2016-04-02 17:25:38 +02:00
Alex Szpakowski 62c97381e9 Updated ENet to 1.3.13. 2016-04-02 12:10:44 -03:00
Alex Szpakowski 175c3af10b Updated stb_image to 2.12. 2016-04-02 12:02:39 -03:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski 1461da598e Updated GLAD to use the latest OpenGL and OpenGL ES extensions and versions. 2015-12-31 15:45:32 -04:00
Alex Szpakowski 0474f8167a Updated Box2D to 2.3.2-git. 2015-11-30 23:55:50 -04:00
Alex Szpakowski 05ed70ed18 Updated stb_image to 2.07. 2015-09-13 11:26:11 -03:00
Martin Felis 1ea54042e3 Fixed compilation when building for Android. 2015-08-13 19:39:56 -03:00
Bart van Strien 3cb777e2b7 Add basic lua 5.3 support 2015-06-16 10:25:41 +02:00
Alex Szpakowski 8c3dd76327 Updated LZ4 to the latest version. 2015-05-29 18:01:02 -03:00
Alex Szpakowski cc634d1871 Updated stb_image to 2.0.5. 2015-05-03 17:14:49 -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 2a482f8e98 Updated stb_image to version 2.0.3. 2015-04-12 15:48:25 -03:00
Alex Szpakowski a17fed2a1e Fixed utf8.char. 2015-03-28 13:44:39 -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 d00773b974 Updated GLAD for the latest GL and GLES extensions. 2015-03-15 23:45:08 -03:00
Alex Szpakowski b9c90e8a6f Fixed the background color for the error screen, and updated LodePNG to the latest version.
--HG--
branch : minor
2015-02-27 21:20:31 -04:00
Alex Szpakowski 5b98083e01 Merged default into minor
--HG--
branch : minor
2015-01-22 02:18:56 -04:00
Alex Szpakowski e82d1dfe54 Added Lua 5.3's UTF-8 module to LÖVE. Resolves issue #951.
The module must be required before use, i.e. utf8 = require("utf8").  API documentation can be found here: http://www.lua.org/manual/5.3/manual.html#6.5

Removing the last unicode character in a string (for proper backspace support in text boxes, for example) can be done using utf8.offset, e.g. text = text:sub(1, utf8.offset(text, -1) - 1).
2015-01-21 16:52:56 -04:00
Alex Szpakowski c1d4613ff7 Updated stb_image to 2.0.2.
--HG--
branch : minor
2015-01-20 03:40:08 -04:00
Alex Szpakowski a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -04:00