Skip to content

Commit

Permalink
tests: use a better-supported canvas format for IO test, and turn off…
Browse files Browse the repository at this point in the history
… blending
  • Loading branch information
slime73 committed Apr 12, 2024
1 parent 1f0f2a0 commit b547321
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testing/tests/graphics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,9 @@ love.test.graphics.Shader = function(test)
#endif
]]

local canvas4 = love.graphics.newCanvas(16, 16, {format="rgba32i"})
local canvas4 = love.graphics.newCanvas(16, 16, {format="rgba8i"})
love.graphics.push("all")
love.graphics.setBlendMode("none")
love.graphics.setCanvas(canvas4)
love.graphics.setShader(shader8)
love.graphics.rectangle("fill", 0, 0, 16, 16)
Expand All @@ -994,7 +995,7 @@ love.test.graphics.Shader = function(test)
local imgdata3 = love.image.newImageData(16, 16, "rgba8")
for y=0, 15 do
for x=0, 15 do
local ir, ig, ib, ia = intimagedata:getInt32(4 * 4 * (y * 16 + x), 4)
local ir, ig, ib, ia = intimagedata:getInt32(4 * (y * 16 + x), 4)
imgdata3:setPixel(x, y, ir, ig, ib, ia)
end
end
Expand Down

0 comments on commit b547321

Please sign in to comment.