diff --git a/internal/graphicsdriver/opengl/graphics.go b/internal/graphicsdriver/opengl/graphics.go index 38a132a90..4a7c0a6d4 100644 --- a/internal/graphicsdriver/opengl/graphics.go +++ b/internal/graphicsdriver/opengl/graphics.go @@ -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) }