jonbro wrote:pgimeno wrote:I only see a dot moving slowly with a black background and clean cut borders. Not sure why.
there is
up at the top of the code... if you turn that on, what kind of output do you get? Also, are you on 0.10? Also, this requires both shader and canvas support, and I don't know how widespread that is.
I get this when enabling debug:
It eventually fills the screen.
Yes, I'm on 0.10.1, and yes, my GC supports shaders and canvases. I've used both myself. OpenGL version supported is 3.3.0. My driver is admittedly old (nVidia 334.21, while the newest is 361.28), but it hasn't broken this bad so far.
EDIT: Just to ensure that the problem is not related to combining multicanvas and shaders, I've made a quick test. It worked as expected.
Code: Select all
local shader = love.graphics.newShader[[
void effects( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords )
{
love_Canvases[0] = vec4(1.0, 0.5, 0.0, 1.0);
love_Canvases[1] = vec4(0.0, 0.5, 1.0, 1.0);
}
]]
local c1, c2 = love.graphics.newCanvas(), love.graphics.newCanvas()
function love.draw()
love.graphics.setCanvas(c1, c2)
love.graphics.setShader(shader)
local sx, sy = love.graphics.getDimensions()
love.graphics.circle("fill", sx/2, sy/2, sx/2)
love.graphics.setCanvas()
love.graphics.setShader()
love.graphics.draw(c1, -sx/2, 0)
love.graphics.draw(c2, sx/2, 0)
end
![Image](http://www.formauri.es/personal/pgimeno/temp/Screenshot-multicanvas.png)