Bart van Strien
9f6aa716fa
Pass Type to luax_register_type by pointer instead of reference
...
Since the type is passed to va_start, and apparently that's undefined behaviour if it's a reference.
<Textmode> the best kind of behavior
--HG--
branch : dynamiccore2
2016-11-14 21:51:47 +01:00
Bart van Strien
d967a755e5
Make love::Type handle type names
...
TODO: Fix undefined behaviour in luax_register_type, you can't use a va_list after a reference type
--HG--
branch : dynamiccore2
2016-11-14 21:06:53 +01:00
Bart van Strien
5d43c9601a
Automatically deduce the type in luax_pushtype, if possible
...
--HG--
branch : dynamiccore2
2016-11-13 17:38:42 +01:00
Bart van Strien
7dd960619d
Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype
...
--HG--
branch : dynamiccore2
2016-11-13 17:13:40 +01:00
Bart van Strien
c761202486
Build type information on first use (load-time), instead of using a hardcoded list
...
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Alex Szpakowski
00d30b2a9d
Merge default into minor
...
--HG--
branch : minor
2016-10-24 18:20:28 -03:00
Alex Szpakowski
894a44f45c
Fix an incorrect delete call when out of memory.
2016-10-22 21:32:44 -03:00
Alex Szpakowski
a9d935caa1
Fixed compilation
...
--HG--
branch : minor
2016-10-21 23:43:26 -03:00
Alex Szpakowski
2222bb37d2
Removed gl.bindTexture, so it won't get accidentally used.
...
--HG--
branch : minor
2016-10-21 23:42:09 -03:00
Alex Szpakowski
14f1afa446
Reduce redundant glActiveTexture calls.
...
--HG--
branch : minor
2016-10-21 22:19:16 -03:00
Alex Szpakowski
d1c5edd792
Prevent redundant glBindBuffer calls.
...
--HG--
branch : minor
2016-10-20 21:50:48 -03:00
Alex Szpakowski
4c122e6581
Add love.graphics.transformPoint and love.graphics.inverseTransformPoint.
...
--HG--
branch : minor
2016-10-20 18:13:20 -03:00
Alex Szpakowski
0653ec9564
Address some compiler warnings about implicit integer conversions.
...
--HG--
branch : minor
2016-10-18 22:32:35 -03:00
Alex Szpakowski
b8b670e0ae
Simplify Drawable code
...
--HG--
branch : minor
2016-10-18 22:06:52 -03:00
Alex Szpakowski
25376ba310
Added SpriteBatch:setDrawRange(start, count) and SpriteBatch:getDrawRange.
...
--HG--
branch : minor
2016-09-21 20:03:39 -03:00
Alex Szpakowski
7ab76b1ef6
Mesh:setDrawRange now takes start and count parameters, instead of min and max.
...
--HG--
branch : minor
2016-09-21 19:44:53 -03:00
Alex Szpakowski
11328a23cf
Don't consider different OpenGL versions when re-creating the window after a previous window and OpenGL context has been created. love.graphics has never supported switching GL versions mid-game, so we should prevent it from ever happening.
...
--HG--
branch : minor
2016-09-11 21:40:00 -03:00
Alex Szpakowski
4dd1b3a83f
Added a new variant of Shader:send for matrices: Shader:send(uniformname, is_column_major, matrix, ...).
...
If is_column_major is true, the table(s) passed as subsequent arguments will be treated as column-major instead of row-major. This matches the 0.10.x behaviour of Shader:send for matrices.
--HG--
branch : minor
2016-09-11 20:57:40 -03:00
Alex Szpakowski
593f96a08c
Add support for non-square matrix uniforms in desktop GLSL. The notation is columns x rows, e.g. a mat4x2 has 4 columns and 2 rows.
...
Fixed the memory layout of matrices sent to shaders via Shader:send. Note that this is a breaking fix and will probably cause matrices designed to work with older versions of LÖVE to be transposed in shaders compared to what they were previously, if Shader:send or sendMatrix was used to put them in the shader.
--HG--
branch : minor
2016-09-11 14:53:23 -03:00
Alex Szpakowski
a853ef6c3a
Remove Shader:sendInt/sendBoolean/sendFloat/sendMatrix/sendTexture
...
--HG--
branch : minor
2016-09-11 13:09:41 -03:00
Alex Szpakowski
54efa825c3
Merge default into minor
...
--HG--
branch : minor
2016-09-11 13:09:01 -03:00
Alex Szpakowski
a9c83897bb
Shader:send improvements.
...
Type and value checking is now completely based on the shader uniform's information, instead of on the arguments to Shader:send. This means Shader:send now converts numbers to integers or floats depending on the uniform's type, and matrices can now be passed in as a flat array (without requiring the 'dimension' field that shader:sendMatrix previously needed).
As a result, Shader:sendTexture, Shader:sendMatrix, Shader:sendInt, and Shader:sendFloat are all deprecated in favour of Shader:send.
Performance of Shader:send has also increased, especially when sending small amounts of values per call.
2016-09-11 12:40:02 -03:00
Alex Szpakowski
7a904de2e1
In fact, lets just replace Shader:getUniformVariable with Shader:hasUniform. The latter returns true if the uniform with the specified name exists and contributes to the final output of the shader.
...
--HG--
branch : minor
2016-09-01 18:32:12 -03:00
Alex Szpakowski
ee79038572
Renamed Shader:getExternVariable to Shader:getUniformVariable. The "extern" alias for shader uniforms is considered deprecated, although it still exists.
...
--HG--
branch : minor
2016-09-01 18:15:25 -03:00
Alex Szpakowski
ef61573cd3
Merge default into minor
...
--HG--
branch : minor
2016-08-29 22:41:24 -03:00
Alex Szpakowski
d572c70883
Fix a GL error on OpenGL ES 3 when using multiple render targets.
2016-08-29 18:48:53 -03:00
Alex Szpakowski
daf13de4eb
Removed the no-argument variant of Text:set() in favour of Text:clear(). Resolves issue #1126 .
...
--HG--
branch : minor
2016-08-20 09:17:14 -03:00
Bart van Strien
9998e761a4
Do not error in newVideo when optionally loading audio with love.audio disabled ( fixes #1206 )
2016-08-15 17:12:36 +02:00
Alex Szpakowski
22056271ec
love.graphics.circle/ellipse/arc/rectangle now take transformation scale into account when determining the number of segments to use. Resolves issue #1184 .
...
--HG--
branch : minor
2016-08-13 12:43:52 -03:00
Alex Szpakowski
e9ac008f43
Merge default into minor
...
--HG--
branch : minor
2016-08-13 12:41:14 -03:00
Alex Szpakowski
3e678fc462
Fix SpriteBatch:setBufferSize to keep old sprite data if it can fit (resolves issue #1204 ).
2016-08-12 23:44:16 -03:00
Alex Szpakowski
8ea1edbc2a
Cause a Lua error instead of silently failing if a vertex buffer memory allocation fails.
2016-07-17 17:44:38 -03:00
Bart van Strien
990839383f
Merge default into minor
...
--HG--
branch : minor
2016-07-14 18:42:42 +02:00
Bart van Strien
7266fa4fc5
Fix memory leak in Text:set ( fixes #1181 )
2016-07-14 14:22:38 +02:00
Bart van Strien
516c0cc21d
Merge default into minor
...
--HG--
branch : minor
2016-06-21 16:07:32 +02:00
Bart van Strien
b328049517
Fix print coloring bug with empty strings ( fixes #1171 )
2016-06-11 19:51:51 +02:00
Alex Szpakowski
57b70e2a7b
The format of the ImageData returned by Canvas:newImageData now matches the Canvas' format as best as possible.
...
--HG--
branch : minor
2016-05-23 13:21:44 -03:00
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
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
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
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
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
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