Commit Graph

1674 Commits

Author SHA1 Message Date
Alex Szpakowski 787ba6b650 Removed some stowaway test code... 2014-06-09 18:32:02 -03:00
Alex Szpakowski 5dd23dffd1 Added Joint:setUserData and Joint:getUserData (resolves issue #894.) 2014-06-05 20:56:43 -03:00
Alex Szpakowski 8483ea31a1 Changed love.graphics.newImage's optional second argument to be a table of flags. Current flags are 'mipmaps' and 'srgb'.
If mipmaps are enabled on image creation, the image will use the default mipmap filter (now 'nearest' by default.) Image:setMipmapFilter will error if the image was not created with mipmaps enabled.

--HG--
branch : minor
2014-06-05 17:19:31 -03:00
Alex Szpakowski 3792dee4b4 Backout changeset 57172a7f03452a6b07f346e850f3e1020e230f46 2014-06-05 14:59:29 -03:00
Alex Szpakowski e9e303c1e8 Changed embedded Lua scripts to be included in the love source via C++11's raw string literals instead of a generated header file. Removed auto.lua.
As a result, love can be compiled immediately after editing an embedded Lua script.

Visual Studio 2013 or newer is required for C++11 raw string literals in Windows.
2014-06-05 13:42:03 -03:00
Alex Szpakowski bfa3ec9369 Merged default into minor
--HG--
branch : minor
2014-06-05 03:02:50 -03:00
Alex Szpakowski ddb9997ead Replaced Joystick:saveGamepadMapping with love.joystick.saveGamepadMappings, which saves all gamepad mappings from both recently-used joysticks and recently-modified mappings. saveGamepadMappings returns a string of newline-separated mappings and takes an optional filename argument which writes it to a file. 2014-06-05 00:25:34 -03:00
Alex Szpakowski 10e0d4b900 Moved the love.joystick Lua wrapper code from modules/joystick/sdl/ to modules/joystick/. 2014-06-04 16:23:39 -03:00
Alex Szpakowski 4cd4d35739 Fixed some logic 2014-06-04 16:06:36 -03:00
Alex Szpakowski 42a565a0eb Fixed love.joystick.loadGamepadMappings to properly enable currently connected Joysticks as Gamepads when necessary. 2014-06-04 16:03:02 -03:00
Alex Szpakowski 79b453653a Added love.joystick.loadGamepadMappings (resolves issue #842), and Joystick:saveGamepadMapping.
The latter returns a mapping string, and the former loads a newline-separated list of mapping strings.
2014-06-04 15:50:06 -03:00
Alex Szpakowski dfa319e01a Replaced the EXCEPT_GUARD macro for converting love exceptions into Lua errors with the new luax_catchexcept function, which takes lambda function arguments. 2014-06-03 19:27:00 -03:00
Alex Szpakowski 724bdbd296 love.graphics.newImage, love.image.newImageData, etc. no longer leave Lua-owned FileData objects floating around waiting to be GC'd when called with filename arguments, resulting in less memory use on startup (resolves issue #890.)
Moved love.filesystem Lua wrapper code from src/modules/filesystem/physfs/ to src/modules/filesystem/.
2014-06-02 00:22:41 -03:00
Alex Szpakowski 6971ece4cb Fixed Mesh:setDrawRange when the Mesh has a vertex map and the first argument to setDrawRange is non-zero. Removed mesh-specific instancing code. 2014-05-30 17:52:58 -03:00
Alex Szpakowski e0f045c310 SpriteBatches are a little more intelligent about how much data they upload to the GPU when they're flushed or drawn, now
--HG--
branch : minor
2014-05-29 17:11:03 -03:00
Alex Szpakowski 51d1f2a7a9 Added support for loading TGA and BMP images (via stb_image.) Added support for encoding ImageData to TGA.
--HG--
branch : minor
2014-05-29 13:20:10 -03:00
Alex Szpakowski f3701dc0e1 Fixed ImageData:encode
--HG--
branch : minor
2014-05-29 00:27:40 -03:00
Alex Szpakowski f973c696f9 Fixed Image:refresh regenerating mipmaps multiple times if mipmap filtering is enabled on an uncompressed image 2014-05-28 01:36:09 -03:00
Alex Szpakowski a028f94ff2 Fixed love.graphics.newMesh(vertexcount, ...) trying to use glDrawArraysInstanced sometimes, fixed Mesh:getVertexMap. 2014-05-23 13:46:13 -03:00
Alex Szpakowski 3551438e9f Don't accidentally enable point smoothing on setMode
--HG--
branch : minor
2014-05-22 21:18:07 -03:00
Alex Szpakowski 54f3a7f8af Removed some OSX-specific code
--HG--
branch : minor
2014-05-21 21:40:56 -03:00
Alex Szpakowski 9c717cc3a3 Changed SpriteBatch:add/set to do an internal bind, and love.graphics.draw(SpriteBatch) to do an internal unbind. Removed SpriteBatch:bind/unbind, and added SpriteBatch:flush.
Resolves issue #886.

--HG--
branch : minor
2014-05-21 21:35:07 -03:00
Alex Szpakowski 53b20b63a5 Merged default into minor
--HG--
branch : minor
2014-05-21 21:16:37 -03:00
Alex Szpakowski fd5b5aad65 Minor code cleanup 2014-05-21 21:14:08 -03:00
Alex Szpakowski cb01e3f4d1 Fixed segfault when garbage collecting Shader objects 2014-05-14 20:00:59 -03:00
Alex Szpakowski 976c26aa21 Removed an unnecessary extension dependency for support of the rg11b10f canvas format 2014-05-14 16:45:16 -03:00
Alex Szpakowski 1d22ea821c Merged bartbes/love-experiments/Canvas-formats into default 2014-05-14 12:42:02 -03:00
Alex Szpakowski 5658a2440b Added some comments describing the formats in the Canvas::Format enum.
--HG--
branch : Canvas-formats
2014-05-14 01:38:33 -03:00
Alex Szpakowski 4aeba24e94 Fixed the rg11b10f canvas format, removed rgb9e5 due to lack of real support, improved love.graphics.hasCanvasFormat to do extra checks
--HG--
branch : Canvas-formats
2014-05-13 21:59:24 -03:00
Alex Szpakowski febbecddf7 Fixed the texture type of the rgb9e5 canvas format
--HG--
branch : Canvas-formats
2014-05-13 21:22:29 -03:00
Alex Szpakowski 408a593113 Added support for several specific Canvas formats. Also added love.graphics.hasCanvasFormat.
The list includes RGBA with 4-bit components, RGBA with 10-bit R, G, and B components and a 2-bit alpha component, RGB with 9-bit RGB components and a 5-bit exponent component (for HDR rendering), and several more.

--HG--
branch : Canvas-formats
2014-05-13 20:54:58 -03:00
Alex Szpakowski 036f6eb8cb Added an optional duration argument to Joystick:setVibration. 2014-05-10 16:52:40 -03:00
Alex Szpakowski 6a491ed0f0 Don't do unnecessary vertex buffer orphaning when calling SpriteBatch:unbind() on a SpriteBatch with the static usage hint 2014-05-06 21:24:26 -03:00
Bart van Strien ce385ec27a Switch from vfork/exec to posix_spawn after clang static analyzer run 2014-05-06 19:48:50 +02:00
Bart van Strien d705b54198 Clean up unused variable after clang static analyzer run 2014-05-06 19:35:02 +02:00
Alex Szpakowski 05d8543518 Improved performance of love.graphics.present slightly on some platforms 2014-05-05 16:30:56 -03:00
Alex Szpakowski e25cdfc71c Fixed creating and setting the write directory on some sandboxed operating systems 2014-05-05 00:27:42 -03:00
Alex Szpakowski 9d293af176 Fixed love.filesystem.setIdentity breaking if a file has been written to an old identity dir before the new setIdentity call 2014-05-04 04:10:46 -03:00
Alex Szpakowski 38b65b859a Merged default into minor
--HG--
branch : minor
2014-05-03 22:27:01 -03:00
Alex Szpakowski 5428a5d75f Backout changeset b3928e24add23da69dcd90c34985cd6a05454be0 2014-05-03 22:07:32 -03:00
Alex Szpakowski 4bc96f1bf6 Internally compose and pass an array of shader source codes to OpenGL, instead of relying on #line to make sure the line number is correct for shader error messages (resolves issue #882) 2014-05-03 21:43:20 -03:00
Alex Szpakowski d7f1262e20 Query the Decoder instead of the current OpenAL buffer when getting the sample rate for calculations in streaming audio Sources.
Some OpenAL implementations return 0 for alGetSourcei(source, AL_BUFFER) if the source isn't static, which eventually results in returning 0 when querying the buffer's sample rate.
2014-05-02 11:31:12 -03:00
Alex Szpakowski 1bc8b7346d Added internal thread name support, for use with debuggers. 2014-05-02 08:56:23 -03:00
Alex Szpakowski e4dc533bb2 Minor code cleanup 2014-05-01 14:12:21 -03:00
Bart van Strien e667485f68 Check argument count of newChainShape 2014-04-26 14:35:39 +02:00
Alex Szpakowski f30a0d72f0 Added Shader:getExternVariable(name).
Returns the base type name ('float', 'image', etc.), the number of components (2 for a vec2), and number of array elements (1 for a non-array variable) for the extern variable with the specified name in the shader.

Returns nil if the variable either doesn't exist or was optimized out by the driver's shader compiler.
2014-04-25 20:32:42 -03:00
Alex Szpakowski 3cf2a8f8a2 Improved error message when love.math.setRandomSeed(0) is attempted (resolves issue #876) 2014-04-24 15:21:53 -03:00
Alex Szpakowski af88423285 Fixed an attempted creation of an array with a constant size of 0 2014-04-23 19:43:54 -03:00
rude 6da3105fe2 Fix some pointer type conversion errors in MSVC.
--HG--
branch : minor
2014-04-23 22:31:56 +02:00
Alex Szpakowski 4d579074a1 Removed love.filesystem.exists (resolves issue #641.)
Use either love.filesystem.isFile or love.filesystem.isDirectory instead.

--HG--
branch : minor
2014-04-23 02:15:02 -03:00