Remove useless debug + setviewport only once

This commit is contained in:
Zyko 2024-04-06 11:40:12 +02:00
parent 9003692630
commit c247da0f05

View File

@ -216,15 +216,16 @@ func (g *Graphics) DrawTriangles(dstIDs [graphics.ShaderDstImageCount]graphicsdr
if dst == nil {
continue
}
if err := dst.setViewport(); err != nil {
return err
}
destinations[i] = dst
dstCount++
}
if dstCount == 0 {
return nil
}
// Only necessary for the same shared framebuffer
if err := destinations[0].setViewport(); err != nil {
return err
}
// Color attachments
var attached []uint32
@ -232,9 +233,6 @@ func (g *Graphics) DrawTriangles(dstIDs [graphics.ShaderDstImageCount]graphicsdr
if dst == nil {
continue
}
if dstCount > 1 {
//fmt.Println("id:", dst.texture, "ok:", dst.id, "regions:", len(dstRegions))
}
attached = append(attached, uint32(gl.COLOR_ATTACHMENT0+i))
g.context.ctx.FramebufferTexture2D(gl.FRAMEBUFFER, uint32(gl.COLOR_ATTACHMENT0+i), gl.TEXTURE_2D, uint32(dst.texture), 0)
}