Page 1 of 5

11.0 bugs

Posted: Wed Apr 04, 2018 2:59 pm
by pgimeno
  • I was taking a look at the source and found this snippet in wrap_Graphics.cpp:

    Code: Select all

    if (targets.colors.back().canvas->getTextureType() != TEXTURE_2D)
      return luaL_error(L, "The table-of-tables variant of setCanvas must be used with non-2D Canvases.");
    
    By my reading, the error message should either be "can't be used with non-2D..." or "must be used with 2D...".

  • love.image.newImageData(1, 1, 'abcd') worked in 0.10 (creating an rgba8 image with the given data); in 11.0 it's triggering "Invalid pixel format: abcd" - however love.image.newImageData(1, 1, 'rgba8', 'abcd') works as expected. Is that just a documentation issue? Or was the intention to default to 'rgba8' like 0.10 did, when using a 3-parameter version?

Re: 11.0 bugs

Posted: Wed Apr 04, 2018 4:16 pm
by slime
pgimeno wrote: Wed Apr 04, 2018 2:59 pm By my reading, the error message should either be "can't be used with non-2D..." or "must be used with 2D...".
The error is trying to say that non-2D canvases must use a different variant of the function than setCanvas(canvas, ...) or setCanvas{canvas, ...} (they must use a new table-of-tables variant).
pgimeno wrote: Wed Apr 04, 2018 2:59 pm love.image.newImageData(1, 1, 'abcd') worked in 0.10 (creating an rgba8 image with the given data); in 11.0 it's triggering "Invalid pixel format: abcd" - however love.image.newImageData(1, 1, 'rgba8', 'abcd') works as expected. Is that just a documentation issue?
Yes, the old 3 parameter version is removed. The new function definition is newImageData(width, height [, format [, rawbytes]]) instead of newImageData(width, height [, rawbytes]).

Re: 11.0 bugs

Posted: Wed Apr 04, 2018 4:44 pm
by Davidobot
The changelog has the following line:

Code: Select all

Added Shader:send(matrixname, is_column_major, matrix, ...) which specifies how to interpret the matrix table arguments.
But the page for Shader:send only has this version:

Code: Select all

Shader:send( name, data, matrixlayout, offset, size )
Further, changing the matrixlayout between "row" and "column" seems to have no effect.

I also think that the change from matrices being column-major to row-major should be listed in the changelog.

Re: 11.0 bugs

Posted: Wed Apr 04, 2018 4:53 pm
by pgimeno
@slime:

Thanks for the explanation on the error message. It's clear now, though I wonder if it will mislead more people.

About newImageData, I've edited the wiki accordingly. I may have screwed up the order, not sure.

To hopefully prevent it from getting lost in the other thread, and since I can't use the issue tracker submit form in BitBucket, I'll add it here too: when building as static, pthread is missing from the link line.

@Davidobot: Yeah, I was confused by that too. Note that the variant listed in the docs actually requires a Data object, not a table. No idea how to generate that object (maybe from a Transform? but there's no Transform:getData() so no idea), or why it's useful.

Re: 11.0 bugs

Posted: Thu Apr 05, 2018 12:28 am
by MarvelME
Console stopped working:

Code: Select all

c:\Gamedev\Love\RL2\RL2>"c:\Program Files\LOVE\lovec.exe" c:\Gamedev\Love\RL2\RL2 s
Error: [string "boot.lua"]:385: Could not create console.
stack traceback:
        [string "boot.lua"]:637: in function <[string "boot.lua"]:633>
        [C]: in function '_openConsole'
        [string "boot.lua"]:385: in function <[string "boot.lua"]:311>
        [C]: in function 'xpcall'
        [string "boot.lua"]:645: in function <[string "boot.lua"]:639>
        [C]: in function 'xpcall'

Win10 x64

.. but its not a issue for me, changed lovec to love, ait it just prints to console

Re: 11.0 bugs

Posted: Thu Apr 05, 2018 1:26 pm
by SiENcE
It's a hard crash.

Samples attached (it's not from me, it was earlier shared in the forum).

When i comment the following line out, everything works.

Code: Select all

shader2 = love.graphics.newShader("shader2.glsl")

Re: 11.0 bugs

Posted: Thu Apr 05, 2018 1:34 pm
by azoyan
Where is love.audio.setEffect documentation? I see only https://love2d.org/wiki/Source:setEffect documentation.

Re: 11.0 bugs

Posted: Thu Apr 05, 2018 1:47 pm
by SiENcE
azoyan wrote: Thu Apr 05, 2018 1:34 pm Where is love.audio.setEffect documentation? I see only https://love2d.org/wiki/Source:setEffect documentation.
I think it's no bug... but this is all i can find: https://love2d.org/wiki/Effect_Constant ... Candidates

Also: https://love2d.org/irclogs/love-2017-06-21.log

Re: 11.0 bugs

Posted: Thu Apr 05, 2018 2:25 pm
by zorg
azoyan wrote: Thu Apr 05, 2018 1:34 pm Where is love.audio.setEffect documentation? I see only https://love2d.org/wiki/Source:setEffect documentation.
Someone still needs to write that for the wiki i guess.

Re: 11.0 bugs

Posted: Thu Apr 05, 2018 2:41 pm
by Ref
Is there no direct way to get imagedata from an image in Love 11?
The only way I've found is to draw the image to a canvas and then get the imagedata from the canvas or to reload the image from a file as imagedata.