mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
gpu,gpu/internal,internal/gl: replace BlitFramebuffer with CopyTexture
OpenGL ES 2.0 doesn't support glBlitFramebuffer, but does support glCopyTexSubImage2D. Fortunately, we don't need the extra features of glBlitFramebuffer anyway. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -524,9 +524,9 @@ func (b *Backend) startBlit() C.CFTypeRef {
|
||||
return b.blitEnc
|
||||
}
|
||||
|
||||
func (b *Backend) BlitFramebuffer(dst, src driver.Framebuffer, srect image.Rectangle, dorig image.Point) {
|
||||
func (b *Backend) CopyTexture(dst driver.Texture, dorig image.Point, src driver.Framebuffer, srect image.Rectangle) {
|
||||
enc := b.startBlit()
|
||||
dstTex := dst.(*Framebuffer).texture
|
||||
dstTex := dst.(*Texture).texture
|
||||
srcTex := src.(*Framebuffer).texture
|
||||
ssz := srect.Size()
|
||||
C.blitEncCopyFromTexture(
|
||||
|
||||
Reference in New Issue
Block a user