mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/graphicsdriver/opengl: Stop using PBO
PBO was introduced to improve the performance at ReplacePixels, but we found that PBO can degrades the performance. Also, now multiple glTexImage2Ds are called successively like a batch, so the situation is now different from that time when PBO was introduced. Let's remove PBO usages and wait and see. Closes #1678
This commit is contained in:
parent
79220192ac
commit
2a8e8d0eb6
@ -449,7 +449,7 @@ func (c *context) needsRestoring() bool {
|
||||
}
|
||||
|
||||
func (c *context) canUsePBO() bool {
|
||||
return isPBOAvailable()
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *context) texSubImage2D(t textureNative, args []*driver.ReplacePixelsArgs) {
|
||||
|
@ -530,7 +530,7 @@ func (c *context) needsRestoring() bool {
|
||||
}
|
||||
|
||||
func (c *context) canUsePBO() bool {
|
||||
return isWebGL2Available
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *context) texSubImage2D(t textureNative, args []*driver.ReplacePixelsArgs) {
|
||||
|
@ -120,6 +120,7 @@ func (i *Image) ReplacePixels(args []*driver.ReplacePixelsArgs) {
|
||||
}
|
||||
i.graphics.drawCalled = false
|
||||
|
||||
// TODO: Now canUsePBO always returns false (#1678). Remove the code for PBO.
|
||||
if !i.graphics.context.canUsePBO() {
|
||||
i.graphics.context.texSubImage2D(i.textureNative, args)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user