Alex Szpakowski
23fcaec89f
The Variant class is now meant to be used on the stack instead of allocated on the heap. As a result (and because of related changes), performance of Channels has roughly doubled when pushing and popping most types.
2016-02-14 16:39:32 -04:00
Alex Szpakowski
f7ee949af8
Fixed love.graphics.clear(colortable) causing crashes in GLES 2.0 when a Canvas is active (resolves issue #1127 ).
2016-02-14 00:26:02 -04:00
Alex Szpakowski
7ff411bb00
Merged in TannerRogalsky/love/source_relative_bug_fix (pull request #54 )
...
Source:setRelative bug fix
2016-02-13 12:24:33 -04:00
Tanner Rogalsky
6336f2adac
Use passed value when setting a Source's relative state instead of the stale, cached value.
...
--HG--
branch : source_relative_bug_fix
2016-02-13 10:58:03 -05:00
Alex Szpakowski
7c4edf2efc
love.graphics object creation functions (love.graphics.new*) now cause an error instead of hard-crashing, if called when the window has not been created yet.
2016-02-11 22:34:33 -04:00
Alex Szpakowski
ab4cfb4a35
Added an optional 'collideconnected' boolean argument to love.physics.newMotorJoint (resolves issue #1130 ).
2016-02-02 08:38:07 -04:00
Alex Szpakowski
c2de8dbb6a
Fixed audio on android to properly pause when the app is inactive, and resume when the app becomes active again.
2016-01-31 18:41:24 -04:00
Alex Szpakowski
b794ffa84a
love.touch.getTouches now returns the list of ids in a stable order, instead of being effectively randomly ordered.
...
The least recently pressed (longest-pressed) active touch id is first in the list, etc.
2016-01-30 22:35:25 -04:00
Alex Szpakowski
7db2997bc3
Improved the error messages caused when invalid or missing arguments are given to ImageData and SoundData methods.
2016-01-26 22:19:35 -04:00
Alex Szpakowski
6aa84187ba
Fixed loading BMFont files which have characters with 0 width or height (e.g. a space character).
2016-01-17 22:55:12 -04:00
Alex Szpakowski
7299a237fb
Added Text:getDimensions
2016-01-16 12:51:31 -04:00
Alex Szpakowski
9ec6eceb8a
Cleaned up the error message code when love.window.setMode fails.
2016-01-14 19:16:41 -04:00
Alex Szpakowski
abd3c64bc5
Moved another AMD-specific driver bug workaround to the OpenGL Bugs struct.
2016-01-13 21:43:00 -04:00
Alex Szpakowski
314a82b126
Fixed the piecewise function in linearToGamma to use <= instead of < when determining whether to use the linear part of the function.
2016-01-13 21:23:56 -04:00
Alex Szpakowski
a95235ffa1
Typo fixes in a comment
2016-01-10 20:13:06 -04:00
Alex Szpakowski
8566729229
Merged in Bobbyjones/love/new-conf-flag-for-android-2 (pull request #53 )
...
New conf flag for android 2
2016-01-10 20:11:34 -04:00
Alex Szpakowski
8a59743481
Added comments to the Bugs struct in OpenGL.h detailing some driver bugs that have workarounds that don't need conditional codepaths.
2016-01-10 16:12:51 -04:00
Alex Szpakowski
6d6d805858
Workaround for love.graphics.clear + love.graphics.setCanvas AMD driver bug, take two.
2016-01-09 23:40:04 -04:00
BobbyJones
2c550fbf6d
now I removed it from the wrap :)
...
--HG--
branch : new-conf-flag-for-android-2
2016-01-09 19:47:45 -05:00
BobbyJones
e855f2ae01
removed the isAndroidSaveExternal from the wrap
...
--HG--
branch : new-conf-flag-for-android-2
2016-01-09 19:45:47 -05:00
Alex Szpakowski
4f093e7fac
Added a workaround for an AMD driver bug where setCanvas + clear + setCanvas doesn't work.
2016-01-09 17:14:05 -04:00
BobbyJones
57467448ad
Made the android set save functions private.
...
--HG--
branch : new-conf-flag-for-android-2
2016-01-09 10:35:20 -05:00
Alex Szpakowski
9d6ff6e5de
Fixed love.graphics.newFont(filedata) causing crashes (resolves issue #1119 ).
2016-01-05 19:59:29 -04:00
Bart van Strien
f53e0026ab
Make VideoStream::isPlaying return false when EOS has been reached
...
Before it would return the playing status of the FrameSync, but a DeltaSync doesn't stop at the end of the video, now it returns the least of the FrameSync and the EOS condition
2016-01-05 21:45:44 +01:00
Bart van Strien
2313f3091a
Improve seeking, hopefully fix hangs on shutdown
...
Instead of returning the frame past our target, now return the frame for our target.
Also defer to rewind implictly, rather than explicitly.
Lastly, detect seeking past the end of the stream, and set EOS appropriately.
2016-01-05 17:48:44 +01:00
Alex Szpakowski
a9e10dcadf
Fixed RandomGenerator.random crashing if a nil 'self' is passed. (closes issue #1116 )
...
It still doesn't generate a proper error message if a non-RandomGenerator 'self' is used, however.
2016-01-02 21:15:39 -04:00
BobbyJones
e3da734ace
clean up
2016-01-02 18:56:23 -05:00
BobbyJones
3aa51763e2
made a method for setting external save location on android
2016-01-02 18:52:25 -05:00
Alex Szpakowski
46a2e7b85c
Happy new year! 🎉
2016-01-01 00:05:06 -04:00
Alex Szpakowski
b48117544d
Added "lighten" and "darken" blend modes (resolves issue #443 ).
...
They perform the equations res.rgba = max(dst.rgba, src.rgba) and res.rgba = min(dst.rgba, src.rgba) respectively.
They only work when the "premultiplied" blend alpha mode is used, and an error occurs otherwise. They also aren't supported on some non-iOS OpenGL ES 2 systems. Check for support with love.graphics.getSupported().lighten.
2015-12-31 15:54:02 -04:00
Alex Szpakowski
5a98af7e2d
ASTC has guaranteed support when OpenGL ES 3.2 is used.
2015-12-31 15:48:05 -04:00
BobbyJones
3c83fb8626
Added a flag that changes android storage from internal to external.
2015-12-31 01:28:00 -05:00
Alex Szpakowski
a42341aa73
Added a new variant of love.graphics.arc: arc(drawmode, arcmode, x, y, radius, angle1, angle2 [, points]).
...
arcmode is "open", "closed", or "pie" (with pie being the mode used for the original variant of the function).
2015-12-31 00:13:01 -04:00
Alex Szpakowski
ef94e43af1
Fixed Shader:sendColor incorrectly converting alpha from sRGB to linear RGB when gamma-correct rendering is enabled.
2015-12-29 01:30:45 -04:00
Alex Szpakowski
1ad5a768f6
Fixed love.graphics.newMesh(vertices) double-converting colors from sRGB to linear RGB, when gamma-correct rendering is enabled.
2015-12-29 01:11:05 -04:00
Alex Szpakowski
09e6a9a434
When multiple canvases are active at once (MRT), individual canvases can now be selectively cleared with love.graphics.clear(c1, c2, ...) by passing empty tables for the canvases that shouldn't be cleared, and color tables for the canvases that should.
2015-12-29 00:10:40 -04:00
Alex Szpakowski
b56a0cfc3d
Avoid hard crashes when calling love.filesystem functions if love.filesystem.init was never called.
...
This only applies when liblove is used directly, as love.filesystem.init is called automatically when the love executable starts up.
2015-12-24 22:53:48 -05:00
Alex Szpakowski
67fe29b30e
More accurate comment.
2015-12-24 17:33:50 -05:00
Alex Szpakowski
c751e4881a
Possibly fixed everything showing up as black on some Android devices.
2015-12-24 17:09:30 -05:00
Alex Szpakowski
538f3869c5
Don't query the current texture bindings when initializing OpenGL.
2015-12-24 15:53:50 -05:00
Alex Szpakowski
9e7c9186d4
Fixed the equals / keypad-equals scancodes.
2015-12-21 11:04:50 -05:00
Alex Szpakowski
2ad1712eaf
Font:getWrap can now accept a colored text table in the same format as what's accepted by love.graphics.print. Resolves issue #1108 .
...
The returned table of strings still has no color information.
2015-12-20 19:25:09 -05:00
Alex Szpakowski
efa08b1e44
Fixed a compile failure on Android (thanks xenthral!)
2015-12-19 22:21:50 -04:00
Alex Szpakowski
f6809f941d
Cleaned up some love.window code.
2015-12-17 23:15:06 -04:00
Alex Szpakowski
4e75c7be9a
Improved the window and OpenGL context creation code to try more options if the OpenGL version is too low (e.g. if the driver in Windows gave back a Microsoft GL 1.1 software context because of a high requested MSAA value.)
2015-12-17 19:03:13 -04:00
Alex Szpakowski
48345bd58c
Changed the optional 'multiply alpha' boolean argument in love.graphics.setBlendMode to be an enum with constants 'alphamultiply' and 'premultiplied'.
...
The default value for the second argument of setBlendMode is 'alphamultiply'.
2015-12-16 14:53:16 -04:00
Alex Szpakowski
dad93959f9
Fixed a memory leak.
2015-12-15 21:51:47 -04:00
Alex Szpakowski
5460a5b872
Hopefully work around an nvidia graphics driver bug in OS X.
...
Some nvidia GPUs in OS X fail to render geometry that uses an OpenGL index buffer and client-side vertex arrays. This affected ParticleSystems and love.graphics.print. The code for those has been changed to use a client-side index array instead of an OpenGL index buffer.
2015-12-15 21:50:38 -04:00
Alex Szpakowski
cdc019b96b
libmodplug is now used on iOS.
2015-12-15 14:03:44 -04:00
Alex Szpakowski
0a059814e7
Revamped love.graphics.stencil and love.graphics.setStencilTest:
...
- Each canvas (and the screen) has an invisible stencil value associated with each pixel. Stencil values are between [0, 255].
- love.graphics.stencil takes a function argument which draws things, and makes the geometry of what's drawn set the stencil values of pixels instead of coloring the pixels.
- Its second argument is a 'stencil action' which determines what happens to the stencil values of pixels. The possible stencil actions are 'replace' (the default), 'invert', 'increment', 'decrement', 'incrementwrap', and 'decrementwrap'. If the stencil action is 'replace', the third argument of love.graphics.stencil is a number between [0, 255] which determines what the stencil value of each pixel that touches drawn objects is replaced with.
The fourth argument is a boolean which determines whether the previous stencil values of all pixels on-screen should be kept (true), or cleared to 0 (false, the default.) love.graphics.clear also clears the stencil values.
- love.graphics.setStencilTest allows for anything drawn to be affected by a comparison between the arguments to setStencilTest and the existing stencil value of the pixels that are touched by what's drawn. Its first argument is a compare mode which can be 'equal', 'notequal', 'less', 'lequal', 'gequal', or 'greater', and the second argument is an integer value (between 0 and 255) used in the comparison with the value in the stencil buffer.
For example, love.graphics.setStencilTest("greater", 0) will cause any geometry drawn afterwards to only appear on pixels whose stencil value is greater than 0.
2015-12-14 20:43:39 -04:00