Commit Graph

2973 Commits

Author SHA1 Message Date
Alex Szpakowski 100404c917 Revert a dumb change that caused a crash due to reading from invalid memory
--HG--
branch : minor
2016-11-26 00:36:59 -04:00
Alex Szpakowski 82f66e3026 Hopefully fix a couple potential issues with restoring Shader texture units after a setMode.
--HG--
branch : minor
2016-11-25 23:50:37 -04:00
Alex Szpakowski 5bf25007da Fix building for iOS
--HG--
branch : minor
2016-11-25 23:21:08 -04:00
Alex Szpakowski 9930b81f94 The Xcode project now recognizes frameworks placed in love/platform/Xcode/macosx/Frameworks/ when building for macOS (closes issue #1230).
--HG--
branch : minor
2016-11-25 23:10:29 -04:00
Alex Szpakowski 2c28eef74a Added 2 new variants of Mesh:attachAttribute (resolves issue #1233). Thanks xenthral!
- Added Mesh:attachAttribute(name, mesh, nameInMesh) which retargets the attribute name in the specified Mesh (3rd argument) to a new name for this mesh (1st argument).
- Added Mesh:attachAttribute(name) which detaches any attached attributes from other meshes for that attribute name.

--HG--
branch : minor
2016-11-25 22:51:31 -04:00
Alex Szpakowski 050ca413be Fix a missing reciprocal..
--HG--
branch : minor
2016-11-25 20:07:30 -04:00
Alex Szpakowski 92774b759b Fix line and shape segment counts and smooth line antialiasing when love.graphics.applyTransform and replaceTransform are used.
--HG--
branch : minor
2016-11-25 19:59:48 -04:00
Alex Szpakowski f85ee6b504 Add some more graphics feature and limit queries (resolves issue #1234).
love.graphics.getSupported():
 - Added “fullnpot” field, is true everywhere except on some older mobile devices. If false, mipmapping and wrap modes other than “clamp” can’t be used on non-power-of-two sized textures.
 - Added “pixelshaderhighp” field, is true everywhere except some older mobile devices. If false, “highp” precision can’t be used in pixel shaders and love will default to “mediump” instead.

love.graphics.getSystemLimits():
- Added “anisotropy” field, gets the maximum amount of anisotropy you can specify in Texture:setFilter. love will clamp anisotropy arguments greater than this value.

--HG--
branch : minor
2016-11-25 19:35:07 -04:00
Alex Szpakowski 5d2b0a98e5 Add missing applyTransform and replaceTransform functions…
--HG--
branch : minor
2016-11-24 21:54:19 -04:00
Alex Szpakowski 5e5b247fc7 Work around buggy C++11 standard libraries (mingw)
--HG--
branch : minor
2016-11-24 21:37:13 -04:00
Alex Szpakowski 14aa6965b3 Added Transform objects to love.math (resolves issue #1228).
- Added love.math.newTransform.
- Added love.graphics.applyTransform and love.graphics.replaceTransform.
- love.graphics.draw/print/printf, Text:add/addf, and SpriteBatch:add can accept a Transform argument.
- love.graphics.push can accept an optional Transform as a second argument, which will apply the Transform after pushing the matrix stack,
- Shader:send can accept Transform objects when sending to a mat4 uniform variable.

--HG--
branch : minor
2016-11-24 21:30:45 -04:00
Alex Szpakowski 9d2ee6d909 Shader uniforms keep their values after love.window.setMode (resolves issue #1174).
Also allow arrays of images/samplers in shaders, although driver support is iffy and you have to index into the array using a compile-time constant (which might exclude loop indexing).

--HG--
branch : minor
2016-11-21 18:28:16 -04:00
Alex Szpakowski 639c229bd7 Rename RecordingDevice:startRecording and RecordingDevice:stopRecording to RecordingDevice:start and RecordingDevice:stop.
--HG--
branch : minor
2016-11-20 10:08:07 -04:00
Alex Szpakowski a245819ae1 Fix compilation on macOS and iOS. Minor cleanup.
--HG--
branch : minor
2016-11-20 10:04:08 -04:00
Alex Szpakowski 99a3653d10 Merged in rcoaxil/love-patches/minor-mic-input (pull request #68)
Microphone input implemented.

--HG--
branch : minor
2016-11-20 13:51:49 +00:00
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
Raidho 422325588e fixed potential memory leak, minor code imporovements
--HG--
branch : minor-mic-input
2016-11-04 05:40:07 +03:00
Raidho c7c253f449 made getRecordingDevices keep already existing devices
--HG--
branch : minor-mic-input
2016-11-03 20:24:21 +03:00
Raidho 57d02dec2b Addressed some criticism
getRecordingDevices internal function is now returns constant reference,
also re-enumerates devices every time it is called; this is a slow operation
getID removed for not being useful

--HG--
branch : minor-mic-input
2016-11-03 06:31:31 +03: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
Raidho a99c757652 made :getData produce SoundData directly
moved SoundData::load back to private

--HG--
branch : minor-mic-input
2016-10-25 02:39:39 +03:00
Raidho 3de68707d1 made device enumeration lazy
made enumerator to first attempt aquire default device name by standard means,
then to fall back to read name from opened device
getRecordingDeviceCount removed for being redundant

--HG--
branch : minor-mic-input
2016-10-25 02:05:53 +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
Raidho 424d2704ec made RecordingDevice throw errors on invalid parameters
--HG--
branch : minor-mic-input
2016-10-23 19:22:56 +03:00
Raidho 9a090e8df8 made RecordingDevice create new SoundData every time captured samples are aquired
--HG--
branch : minor-mic-input
2016-10-23 18:53:02 +03:00
Raidho 87f0b2811e Microphone input implemented.
RecordingDevice class added
(number)love.audio.getRecordingDeviceCount() and (table)love.audio.getRecordingDevices() exposed
(bool):startRecording([samples, sampleRate, bitDepth, channels], (SoundData):stopRecording([SoundData]),
(SoundData):getData([SoundData]), (number):getSampleCount(), (number):getSampleRate(), (number):getBitDepth(),
(number):getChannels(), (string):getName(), (number):getID(), (bool):isRecording() member functions exposed
previously existed stub implementation removed
getFormat moved to love::audio::openal::Audio
getFormat arguments order swapped to (bitDepth, channels)
getFormat now returns AL_NONE if format is invalid

--HG--
branch : minor-mic-input
2016-10-23 17:56:52 +03:00
Alex Szpakowski 894a44f45c Fix an incorrect delete call when out of memory. 2016-10-22 21:32:44 -03:00