Commit Graph

2949 Commits

Author SHA1 Message Date
Alex Szpakowski f118befeba Potentially fix a random error in setMode
--HG--
branch : minor
2016-11-19 23:47:33 -04:00
Alex Szpakowski bed9bc1bae We don’t need a list of projection matrices..
--HG--
branch : minor
2016-11-19 20:12:12 -04:00
Alex Szpakowski 247e1b6af0 Merge default into minor
--HG--
branch : minor
2016-11-19 19:19:14 -04: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
Alex Szpakowski aeca14a35a Merged in rcoaxil/love/minor (pull request #66)
consistified seeking to invalid location behavior, minor fixes

--HG--
branch : minor
2016-11-17 22:06:06 +00:00
Alex Szpakowski b084934311 Fix Shader:send and sendColor ignoring the last argument for shader uniform arrays. 2016-11-16 17:37:43 +00:00
Alex Szpakowski c647317a74 Re-generated boot.lua.h. 2016-11-05 17:33:32 -03:00
Alex Szpakowski da3e292389 Merged in xpol/love/better-parse-options (pull request #71)
Better love.arg.parse_options():
2016-11-05 20:29:50 +00:00
Xpol Wan c28a6c51c4 love.arg.parse_option just return how many extra arg the current option consumes.
--HG--
branch : better-parse-options
2016-11-04 22:27:49 +08:00
xpol de855f30d5 Better love.arg.parse_options():
1. use string.match for we are mean to match
2. better match pattern which now do not allow somthing like `not-a-valid--console`
3. use while loop which allows change loop var.

--HG--
branch : better-parse-options
2016-11-04 11:37:38 +08: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
Bart van Strien 3336accb8f Added tag 0.10.2 for changeset afc69c4f7145 2016-10-31 20:23:56 +01:00
Bart van Strien 9e13977995 Added release date for 0.10.2 0.10.2 2016-10-31 20:23:52 +01:00
Alex Szpakowski 5ba449d1ff Add support for BC4-7 compressed texture formats in KTX files. Updated the changelog. 2016-10-29 23:42:40 -03:00
Alex Szpakowski 43fcacc653 Merged in nkorth/love (pull request #70)
Add 'ellipse' distribution to ParticleSystem
2016-10-29 15:35:10 +00:00
Alex Szpakowski ba21512259 Updated the changelog 2016-10-29 12:30:15 -03:00
Nathan Korth 53c528aa44 Add 'ellipse' distribution to ParticleSystem 2016-10-28 16:26:28 -04:00
Alex Szpakowski db78c89639 Merged in brocoli_/love/set-raw-transform (pull request #69)
Added new raw values constructor to Matrix4 and Matrix4::setRawTransformation().
2016-10-26 20:39:34 +00:00
Julio Felipe Angelini cdf7199c48 Added new raw values constructor to Matrix4 and Matrix4::setRawTransformation().
--HG--
branch : set-raw-transform
2016-10-26 17:45:28 -02: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 6d95ff7fb7 Remove old (cmake-only) workaround for issue #1173. 2016-10-25 15:33:30 +02: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
Alex Szpakowski ec7565176e Add love.window.isMaximized 2016-10-24 21:35:22 -03:00
Alex Szpakowski ff53e8fe71 Fix non-integer coordinates passed to ImageData:mapPixel/setPixel/getPixel and SoundData:set/getSample.
LuaJIT does interesting things when you index into a FFI array using a non-integer value.
2016-10-24 18:14:09 -03:00
Alex Szpakowski d57ce8ae73 The answer is no :( 2016-10-23 23:00:46 -03:00
Alex Szpakowski 295fff5db8 Testing whether appveyor can build with Windows XP support 2016-10-23 22:56:19 -03:00
Alex Szpakowski 894a44f45c Fix an incorrect delete call when out of memory. 2016-10-22 21:32:44 -03:00
Alex Szpakowski a9593d926e Fix love.math.noise(nil) to error instead of returning nil. 2016-10-20 22:57:12 -03:00
rcoaxil 3c413a293b stray minus sign
--HG--
branch : minor
2016-10-19 05:13:30 +03:00
rcoaxil 329e10d35b stb hack revert
--HG--
branch : minor
2016-10-18 05:36:28 +03:00
rcoaxil 9bed2ac33a moved back update cycle constant looping override for static sources
--HG--
branch : minor
2016-10-18 05:33:34 +03:00
rcoaxil b337e0ff6f consistified seeking to invalid location behavior
removed few redundant operations and checks
moved sound start seeking from prepare to play
fixed potential bug with sources that failed to play not releasing AL source
back into the pool
sources now stop if seeked to invalid location
looped sources play from 0 if seeked to invalid location while playing

--HG--
branch : minor
2016-10-18 05:04:46 +03:00
Alex Szpakowski a844c16657 Simplified Source constructors.
--HG--
branch : minor
2016-10-16 16:04:00 -03:00
Bart van Strien a3f381be07 Update changelog
--HG--
branch : minor
2016-10-15 19:58:54 +02:00
Alex Szpakowski 7cd24de402 Merged in rcoaxil/love/minor (pull request #63)
TYPE_QUEUE Source implemented, ported to minor branch.

--HG--
branch : minor
2016-10-15 17:56:37 +00:00
Alex Szpakowski dafacf3fbc test
--HG--
branch : minor
2016-10-15 14:55:35 -03:00
Alex Szpakowski 4930d85870 Close branch minor
--HG--
branch : minor
2016-10-15 17:50:19 +00:00
rcoaxil 71326564f0 removed some more trailing spaces
oh god i need a tool for this

--HG--
branch : minor
2016-10-15 20:08:41 +03:00
rcoaxil 38a6176665 issues addressed
cropped trailing spaces
put TYPE_MAX_ENUM in getDurationAtomic
moved around variables in seekAtomic

--HG--
branch : minor
2016-10-15 20:04:08 +03:00
rcoaxil c5e0846c52 fixed stream seeking bug
--HG--
branch : minor
2016-10-15 10:02:18 +03:00
rcoaxil 00c02adcd0 issues addressed
warnings fixed
added type checking to Lua functions
stopping queueable source clears buffered data
getting queueable source to auto-play if it underruns and then gets re-filled
will probably require re-designing pool usage strategy

--HG--
branch : minor
2016-10-13 18:18:08 +03:00
rcoaxil b757a0534e pull request feedback addressed
newQueueableSource added
isQueueable removed, getFreeBufferCount added
queueData renamed to queue; added 3 argument variant with (data, offset, length)
lightuserdata variant now requires offset (pointer, offset, length, samplerate, bitdepth, channels)
setLooping now throws exception if called on queueable source

--HG--
branch : minor
2016-10-13 04:40:41 +03:00
Alex Szpakowski a4bdbcdf10 Fix love.audio.newSource(decoder) and love.audio.newSource(sounddata) to no longer require a Source type argument.
--HG--
branch : minor
2016-10-12 17:42:23 -03:00
raidho36 b1c842f186 fixed bug preventing stream sources from loading data
--HG--
branch : minor
2016-10-12 20:49:05 +03:00
raidho36 10710d3428 queueData now returns success state, couple bug fixes
success state return added to queueData functions
queueable source is now seekable while stopped
fixed bug with creating queueable source with invalid format silently crashing LOVE
fixed bug with stopped queueable source reported as not queueable

--HG--
branch : minor
2016-10-12 18:53:49 +03:00
raidho36 7934bfaf7f ported TYPE_QUEUE Source from default to minor
--HG--
branch : minor
2016-10-11 06:30:30 +03:00
Alex Szpakowski 42be56858b Remove duplicate unused code. 2016-10-10 09:33:10 -03:00
Alex Szpakowski 03c38185f6 Fix love.window.maximize to immediately update the window dimensions instead of waiting for the next love.event.pump. Fixes issue #1221. 2016-10-10 09:14:57 -03:00
Alex Szpakowski e969f541ba Fix love.window.setMode to use the proper defaults for window settings that aren't specified.
--HG--
branch : minor
2016-10-08 15:35:31 -03:00
Alex Szpakowski 15ba27f417 Merge default into minor
--HG--
branch : minor
2016-10-08 11:03:37 -03:00