Issue #433 invalid

Vararg variant of pixeleffect:send() apparently doesn't work

created an issue

test code:



local pe = [[ extern vec4 points; vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ) { return points; // do something pointless for now so 'points' won't get discarded } ]]

function love.draw () local x1, y1, x2, y2 = 32.5, 32.5, love.mouse.getX()+.5, love.mouse.getY()+.5 pe:send("points", x1, y1, x2, y2), y1, x2, y2) end }}}

i get an invalid operation error when i run this code, but if i wrap those values into a table it works fine. calling :sendFloat() directly doesn't work either

Comments (1)

  1. vrld

    The wiki documentation seems to be wrong on effect:send(). The vararg version fills arrays, e.g.

    extern number foo[3];
    effect:send('foo', 1,2,3)

    To send a vector, use effect:send('points', {x1,y1,x2,y2}).

  2. Log in to comment