mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
Remove useless debug + setviewport only once
This commit is contained in:
parent
9003692630
commit
c247da0f05
@ -216,15 +216,16 @@ func (g *Graphics) DrawTriangles(dstIDs [graphics.ShaderDstImageCount]graphicsdr
|
|||||||
if dst == nil {
|
if dst == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err := dst.setViewport(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
destinations[i] = dst
|
destinations[i] = dst
|
||||||
dstCount++
|
dstCount++
|
||||||
}
|
}
|
||||||
if dstCount == 0 {
|
if dstCount == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// Only necessary for the same shared framebuffer
|
||||||
|
if err := destinations[0].setViewport(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Color attachments
|
// Color attachments
|
||||||
var attached []uint32
|
var attached []uint32
|
||||||
@ -232,9 +233,6 @@ func (g *Graphics) DrawTriangles(dstIDs [graphics.ShaderDstImageCount]graphicsdr
|
|||||||
if dst == nil {
|
if dst == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if dstCount > 1 {
|
|
||||||
//fmt.Println("id:", dst.texture, "ok:", dst.id, "regions:", len(dstRegions))
|
|
||||||
}
|
|
||||||
attached = append(attached, uint32(gl.COLOR_ATTACHMENT0+i))
|
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)
|
g.context.ctx.FramebufferTexture2D(gl.FRAMEBUFFER, uint32(gl.COLOR_ATTACHMENT0+i), gl.TEXTURE_2D, uint32(dst.texture), 0)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user