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
Alex Szpakowski
8b90f64440
Don't try to bind the love_PseudoInstanceID vertex shader attribute (it's disabled for now)
2014-04-17 19:48:16 -03:00
Alex Szpakowski
f05551a01f
Fixed a potential null pointer dereference and a case of undefined behaviour
2014-04-11 03:48:12 -03:00
Alex Szpakowski
4ea18d8bbc
love.math.setRandomSeed now calls random() a couple times internally, to make similar seeds give less similar results when random() is called for the first time after setRandomSeed.
2014-04-05 18:55:05 -03:00
Bart van Strien
820d8a8267
Add correct header for waitpid in openURL
2014-04-01 16:57:07 +02:00
Alex Szpakowski
38497d23da
Added love.system.openURL (resolves issue #863 )
2014-03-31 16:13:05 -03:00
Alex Szpakowski
c985b1f2f7
Don't destroy OpenGL resources before checking whether the fullscreen size is supported in love.window.setMode.
2014-03-31 05:01:29 -03:00
Alex Szpakowski
be8c19911f
Fixed love.graphics.isCreated to properly return false if love.window.setMode failed
2014-03-31 04:56:29 -03:00
Alex Szpakowski
a22c4b5f92
Explicitly #ifdef'd out SDL 2.0.1+ function calls for Linux to avoid runtime function resolving problems when love is built with SDL 2.0.1+ headers but run using SDL 2.0.0.
2014-03-31 03:45:22 -03:00
Alex Szpakowski
e7947d9d2e
Pulled Mesh:set/getInstanceCount from 0.9.1 for now.
...
The feature is difficult to use well unless custom vertex attributes are added.
2014-03-29 16:30:48 -03:00
Alex Szpakowski
146b3cff19
Added blend mode "screen".
2014-03-27 23:28:36 -03:00
Alex Szpakowski
b95a02772a
Include the freetype error code in the error message when truetype font/glyph loading fails
2014-03-18 19:46:14 -03:00
Alex Szpakowski
50916825d0
Data::getSize now uses size_t instead of int
2014-03-18 03:50:00 -03:00
Alex Szpakowski
aba17607aa
Added an optional callback function argument to love.filesystem.getDirectoryItems. Callback function takes a single argument containing a filepath string.
...
For example: love.filesystem.getDirectoryItems("", print)
2014-03-17 20:14:53 -03:00
Alex Szpakowski
9e6a3b8d5e
Fixed 8-bit SoundData samples when used in a love.audio Source
2014-03-17 15:06:04 -03:00
Alex Szpakowski
89e9288a85
Make sure SoundData objects aren't initialized with garbage sample values
2014-03-13 05:34:16 -03:00
Alex Szpakowski
4faddcd9aa
Fixed some trivial compiler warnings
2014-03-12 17:55:19 -03:00
Alex Szpakowski
a13fd761cc
Updated love.filesystem's C library loader for require to look in paths added via love.filesystem.mount, when in fused mode
2014-03-12 06:19:56 -03:00
Alex Szpakowski
b9fd3f3554
Missed one
2014-03-04 01:09:48 -04:00
Alex Szpakowski
07aba4c147
Added some missing obscure key constants
2014-03-04 00:52:16 -04:00
Alex Szpakowski
f7c0fc1888
Make sure love.window.getMode returns up-to-date information about the window, remove some Mac-specific windowing code now unnecessary with SDL 2.0.2.
2014-03-03 03:36:17 -04:00
Alex Szpakowski
d5096840ba
Fixed Canvas:clear not working properly with antialiased Canvases
2014-03-02 15:49:29 -04:00
Alex Szpakowski
a3afb1a9ca
Refactored the ImageData decoding/encoding backends a bit
2014-03-02 03:17:47 -04:00
Alex Szpakowski
55514720a6
Fixed some minor compiler warnings
2014-03-01 21:16:01 -04:00
Alex Szpakowski
ec0f428c4f
Cleaned up the code for initializing love.filesystem and the source and save directories a bit
2014-03-01 20:23:04 -04:00
Alex Szpakowski
ecf37320a9
Changed love.graphics.newMesh, Mesh:setVertex, and Mesh:setVertices to default the u,v arguments to 0,0 instead of requiring them
2014-02-27 05:38:46 -04:00
Alex Szpakowski
fe5e7c17e7
Added Body:setUserData and Body:getUserData (resolves issue #853_
2014-02-26 20:47:05 -04:00
Alex Szpakowski
94aa39116e
Fixed stencils used when an antialiased Canvas is active
2014-02-16 14:54:33 -04:00
Alex Szpakowski
2a19a4444e
Allow Fixture:setUserData and Fixture:getUserData to be called in coroutines (resolves issue #850.)
...
Bad things will still happen if you call them from a love Thread which didn't create the World and the Fixture object. Don't do it!
2014-02-15 20:59:57 -04:00
Alex Szpakowski
6259e38d84
Meshes will now use the smallest integer data type possible for index buffer (vertex map) values, instead of always using 32-bit integer numbers.
2014-02-12 02:22:57 -04:00
Alex Szpakowski
c17cada9e0
Fixed World:getBodyList, World:getJointList, and World:getContactList causing hard crashes instead of Lua errors
2014-02-10 14:01:59 -04:00
Alex Szpakowski
d07e31370d
Added RandomGenerator:getState and RandomGenerator:setState (resolves issue #831.)
...
getState returns an implementation-dependent string representing the current state of the RandomGenerator's PRNG. setState sets the PRNG's state to an implementation-dependent string.
2014-02-08 20:28:41 -04:00
Alex Szpakowski
de1f105e40
the AL_SOFT_direct_channels OpenAL extension shouldn't be required for compilation
2014-02-08 02:43:13 -04:00
Alex Szpakowski
615492540d
Added ParticleSystem:setRelativeRotation. If enabled, particle rotations and angles will be relative to their current velocities.
2014-02-06 05:46:47 -04:00
Alex Szpakowski
e54d771be4
Added love.math.gammaToLinear and love.math.linearToGamma for converting RGB color values from the sRGB color-space to linear and vice-versa.
2014-02-04 19:45:50 -04:00
Alex Szpakowski
823b1babc8
Specifying the srgb window flag should now cause it to fall back to srgb=false in all situations if an srgb-capable system framebuffer isn't supported, instead of failing to create the window
2014-02-04 02:02:54 -04:00
Alex Szpakowski
b625bb6624
moved Mesh:setWireframe to love.graphics.setWireframe (affects all draws until it's disabled.)
...
Wireframe mode should only be used for debugging: the wireframe lines behave differently than regular lines, their widths aren't affected by the graphics scale, and the mode isn't available on OpenGL ES.
2014-02-03 04:59:58 -04:00
Alex Szpakowski
ce4fdf4ac9
Added sRGB (gamma-correct) support for Images, Canvases, and the main screen.
...
love.graphics.newImage(path, “srgb”) creates a new Image whose texels are treated as being in the sRGB color space, so they are linearized when drawing/sampling from the image.
love.graphics.newCanvas(w, h, “srgb”) creates a new Canvas whose texels are treated as being in the sRGB color space, so drawing to the Canvas does a linear->sRGB conversion (but blends linearly), and sampling from it (drawing it or using it in a shader) converts from sRGB to linear space.
The "srgb" window flag does the same as Canvases for the main screen.
2014-02-02 18:31:41 -04:00
Alex Szpakowski
9e746c56fa
love.graphics.getBlendMode no longer does several glGetInteger function calls
2014-01-30 21:51:17 -04:00
Alex Szpakowski
40242689b1
Fixed rendering to multiple canvases, removed some redundant OpenGL calls when switching between canvases
2014-01-30 21:09:13 -04:00
Alex Szpakowski
2a4d47e614
Added a missing newline to a print statement
2014-01-29 23:10:57 -04:00
Alex Szpakowski
33f12a6091
Source:play now returns false if alSourcePlay failed
2014-01-29 17:04:03 -04:00
Alex Szpakowski
a49c2a88c1
Increased robustness of audio module initialization (see issue #646.) Also changed Source:play to return a boolean indicating success.
2014-01-29 05:24:47 -04:00
Alex Szpakowski
a7ed581204
Reverted ParticleSystem:setPosition’s functionality to 0.9.0’s beheaviour, added ParticleSystem:moveTo which has the new behaviour (new particles spawn in a line between the old position and where the emitter was moved to.)
2014-01-28 03:20:08 -04:00
Alex Szpakowski
6b538b5827
The emission rate for ParticleSystems is no longer restricted to integer numbers.
2014-01-27 23:42:26 -04:00
Alex Szpakowski
d70023e350
Enable OpenGL’s debug output when the LOVE_GRAPHICS_DEBUG environment variable is ‘1’. Resolves issue #607 .
2014-01-27 23:30:16 -04:00
Alex Szpakowski
a2a8b14cfd
Added love.getVersion (resolves issue #809 ).
...
Syntax is: major, minor, revision, codename = love.getVersion().
2014-01-27 19:24:14 -04:00
Alex Szpakowski
c5c788e976
Added a built-in variable readable in shaders: ‘love_ScreenSize’. Its x and y components contain the width and height of the current viewport. Resolves issue #841 .
2014-01-27 02:58:34 -04:00