mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
gpu: drop Framebuffer.IsComplete in favour of an error from NewFramebuffer
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-9
@@ -489,7 +489,7 @@ func (r *renderer) stencilClips(pathCache *opCache, ops []*pathOp) {
|
||||
if fbo != p.place.Idx {
|
||||
fbo = p.place.Idx
|
||||
f := r.pather.stenciler.cover(fbo)
|
||||
bindFramebuffer(f.fbo)
|
||||
f.fbo.Bind()
|
||||
r.ctx.Clear(BufferAttachmentColor)
|
||||
}
|
||||
data, _ := pathCache.get(p.pathKey)
|
||||
@@ -513,7 +513,7 @@ func (r *renderer) intersect(ops []imageOp) {
|
||||
if fbo != img.place.Idx {
|
||||
fbo = img.place.Idx
|
||||
f := r.pather.stenciler.intersections.fbos[fbo]
|
||||
bindFramebuffer(f.fbo)
|
||||
f.fbo.Bind()
|
||||
r.ctx.Clear(BufferAttachmentColor)
|
||||
}
|
||||
r.ctx.Viewport(img.place.Pos.X, img.place.Pos.Y, img.clip.Dx(), img.clip.Dy())
|
||||
@@ -990,13 +990,6 @@ func clipSpaceTransform(r image.Rectangle, viewport image.Point) (f32.Point, f32
|
||||
return scale, offset
|
||||
}
|
||||
|
||||
func bindFramebuffer(fbo Framebuffer) {
|
||||
fbo.Bind()
|
||||
if err := fbo.IsComplete(); err != nil {
|
||||
panic(fmt.Errorf("AA FBO not complete: %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
// Fill in maximal Y coordinates of the NW and NE corners.
|
||||
func fillMaxY(verts []byte) {
|
||||
contour := 0
|
||||
|
||||
Reference in New Issue
Block a user