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:
Elias Naur
2021-08-21 11:11:38 +02:00
parent 44adf01768
commit c9970cb8e3
8 changed files with 32 additions and 20 deletions
+2 -2
View File
@@ -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(