Commit Graph

2068 Commits

Author SHA1 Message Date
Alex Szpakowski d50cf0ac4a Prevent linear filtering on RGBA32F images when the system doesn't support it.
--HG--
branch : minor
2016-05-22 15:59:09 -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
Alex Szpakowski 3e6d01748e Merged default into minor
--HG--
branch : minor
2016-05-22 15:11:15 -03:00
Alex Szpakowski 9900051647 Improved performance of ImageData:mapPixel when JIT compilation is unavailable (e.g. on iOS and Android) 2016-05-21 22:18:12 +00:00
Alex Szpakowski 4666d83beb Fixed ImageData:mapPixel again, for non-JIT platforms this time.
--HG--
branch : minor
2016-05-21 15:24:11 -03:00
Alex Szpakowski 963b4c4447 Fixed ImageData:mapPixel's color component arguments to the mapping function to be within [0, 1] instead of [0, 255].
--HG--
branch : minor
2016-05-21 14:46:17 -03:00
Alex Szpakowski 8b920ba816 Improved the numeric distribution of love.math.random.
--HG--
branch : minor
2016-05-15 10:25:08 -03:00
Alex Szpakowski 31b44797bc Merge default into minor
--HG--
branch : minor
2016-05-12 18:20:01 -03:00
Alex Szpakowski d6310ca87f Fixed glyphs being added to partially out-of-bounds positions in Font texture atlases in rare cases (resolves issue #1162). 2016-05-11 21:38:12 -03:00
Alex Szpakowski d28bc1f42e Fixed a warning about a missing newline at the end of a file. 2016-05-01 21:04:01 -03:00
EntranceJew 67c5eb77ae Put methods for getTexture* on Quad 2016-04-14 18:36:47 -04:00
EntranceJew b2b02c4f8e Exposed getTextureDimensions on Quad 2016-04-14 18:32:39 -04:00
T-Bone 4ef7504c05 Fixed things pointed out by Alex Szpakowski and Bart von Strien 2016-04-09 07:28:03 +02:00
Bart van Strien 55aa09bb42 Allow seeking all paused sources (fixes #1152)
Previously, sources that had never been started, were paused with 'stop', or had finished playing, aka the 0.10.x definition of stopped, would ignore seek.

--HG--
branch : minor
2016-04-08 14:28:22 +02:00
T-Bone b2291fb62a Fixes to make Löve compile on Windows 10 UWP 2016-04-07 22:56:03 +02:00
Alex Szpakowski 094f9a13fe Merge default into minor
--HG--
branch : minor
2016-04-03 10:59:47 -03:00
Alex Szpakowski 03801e49d6 Fix a potential issue when an OpenAL source that was previously static is reused for a streaming Source. 2016-04-03 09:58:17 -03:00
Alex Szpakowski 8cad9c8bf0 Only allow multiply blending when the 'premultiplied' blend alpha mode is used, since the formula only works with that anyway.
--HG--
branch : minor
2016-04-02 18:28:16 -03:00
Alex Szpakowski 1eed86426b Merge default into minor
--HG--
branch : minor
2016-04-02 18:27:33 -03:00
Alex Szpakowski 901cc362df Added 'shaderswitches' to love.graphics.getStats. 2016-04-02 18:14:52 -03:00
Bart van Strien 0aaaf6b6f0 Make hash constants static, and out-of-line hopefully fixes compilation errors with vc++.
--HG--
branch : minor
2016-04-02 19:01:38 +02:00
Bart van Strien 3a2e859acd Add love.math.hash, which supports MD5/SHA-1/SHA-2.
--HG--
branch : minor
2016-04-02 18:39:53 +02:00
Bart van Strien f76879c6b7 New audio playback API
Instead of having three states, stopped, paused and playing, now there's only
two states: paused and playing.

This means resume() is gone, as is isStopped(), and isPaused() has become
isPlaying(). stop() now pauses and rewinds, whereas pause() only pauses.
rewind() has been removed, and should either be replaced with stop() or
seek(0).

The same has been applied to the functions in the love.audio module, except they
get some extra magic:

- love.audio.pause() now returns a table/list of Source objects, which contains
  only the sources it has just paused. This means you can then later restart
  only them, instead of everything (as before).
- love.audio.play/pause/stop now have variants that take a list of Source
  objects, and it starts or stops them all at the same time, this means calling
  play(srcA, srcB) should mean srcA and srcB are much more (but possibly not
  exactly) synchronised than they were with play(srcA); play(srcB).

--HG--
branch : minor
2016-04-02 17:38:19 +02:00
Bart van Strien db8e7a7670 Merge default into minor
--HG--
branch : minor
2016-04-02 17:19:20 +02:00
Alex Szpakowski 175c3af10b Updated stb_image to 2.12. 2016-04-02 12:02:39 -03:00
Alex Szpakowski 1b1572ad85 love.filesystem.mount accepts DroppedFiles in the first parameter. You could previously pass in DroppedFile:getFilename() and it would work too, this just makes it a bit nicer. 2016-03-31 17:58:27 -03:00
Bart van Strien 8dd7cc16ab Fix end-of-stream detection for videos
Fixes hang when a video file contains frames past the end of the video stream
2016-03-29 22:43:20 +02:00
Alex Szpakowski cc1b9bc619 Moved most love.math functions out of the Math class, since they're pure functions.
--HG--
branch : minor
2016-03-28 19:46:29 -03:00
Alex Szpakowski 734789eb93 Added love.math.encode(format, data | string [, linelength]) and love.math.decode(format, data | string). Current formats are "base64" and "hex". The optional line length only applies to base64 and specifies the maximum number of characters per line in the encoded string.
Removed the variant of love.filesystem.newFileData which decoded a base64-encoded string since it's redundant.

--HG--
branch : minor
2016-03-28 19:28:40 -03:00
Alex Szpakowski 3d25416e14 Removed an unused variable. 2016-03-27 11:28:34 -03:00
Alex Szpakowski aa88383793 Fixed per-vertex colors (e.g. spritebatch colors) improperly applying gamma correction when the default shader is used and gamma correction is requested but not supported on OpenGL ES. 2016-03-26 12:01:34 -03:00
Alex Szpakowski 829cf5fd06 Fixed ImageFonts and BMFonts with colored bitmap images to proper sRGB conversions when gamma correction is enabled. 2016-03-25 20:13:49 -03:00
Alex Szpakowski 9efbe4892c Merge default into minor.
--HG--
branch : minor
2016-03-22 20:53:09 -03:00
Alex Szpakowski 090c50795a Fix love.window.setMode crashing if a Canvas is active. 2016-03-22 18:05:26 -03:00
Alex Szpakowski 8b07bad15e Fixed the build. 2016-03-20 22:36:54 -03:00
Alex Szpakowski 9ebd759851 Don't call glGetFloat every time love.graphics.getSystemLimits is called. 2016-03-20 22:00:24 -03:00
Bart van Strien bc932aecef Move spawn.h include, because android doesn't use (or have) posix_spawn 2016-03-20 22:28:14 +01:00
Bart van Strien 2af327dcf9 Make sure android includes the right headers for System.cpp too
Hopefully.
2016-03-20 10:44:36 +01:00
Alex Szpakowski 36cc48d306 Move the Timer::sleep implementation up from timer/sdl/Timer.cpp to timer/Timer.cpp, since it doesn't directly use any SDL-specific code. 2016-03-18 23:01:49 -03:00
Alex Szpakowski b983588d2e We don't need to initialize the SDL timer subsystem to use SDL_Delay, and initializing it causes SDL to create a worker thread (which it uses for SDL_AddTimer and friends, which we don't use). 2016-03-18 22:58:48 -03:00
Bart van Strien f7d226d072 Improve reaping of zombie processes on linux (resolves #1042)
Sadly, it's not a complete fix for #1042, as there seems to be no good way to
deal with system() in multithreaded applications. At least os.execute can
return values other than -1 now.
2016-03-14 17:14:49 +01:00
Bart van Strien 6533665f15 Ignore carriage returns (\r) in print and friends (issue #1114)
--HG--
branch : minor
2016-03-14 14:40:10 +01:00
Alex Szpakowski 293bc79b97 Merge default into minor
--HG--
branch : minor
2016-03-12 22:04:07 -04:00
Alex Szpakowski d0c0240e09 Very minor channel / variant performance improvements and cleanup. 2016-03-12 19:11:03 -04:00
Alex Szpakowski 140faf0cae Channel:push now returns an id value. Added Channel:hasRead(id), which returns true if the value that the id represents has already been popped, demanded, or cleared from the Channel. Resolves issue #1104.
--HG--
branch : minor
2016-03-09 22:04:14 -04:00
Bart van Strien dc7b1fb049 Remove the default source type (resolves #1082)
--HG--
branch : minor
2016-03-08 11:44:36 +01:00
Bart van Strien 34b6aa608b Merge in default
--HG--
branch : minor
2016-03-08 11:29:50 +01:00
Alex Szpakowski a0bbcce8ee The video decoding thread efficiently waits for a video to be created before doing anything, rather than sleeping for 2ms in a loop. Reduces the CPU usage of the video worker thread to ~0% when no videos are loaded. 2016-03-05 21:56:51 -04:00
Alex Szpakowski d4e701b434 SpriteBatch:add will now automatically increase the maximum size of the SpriteBatch if there's no more room.
--HG--
branch : minor
2016-03-05 12:59:00 -04:00
Alex Szpakowski 2e5f385be3 Merge default into minor
--HG--
branch : minor
2016-03-03 21:28:30 -04:00