mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphicsdriver/opengl: Add assertion at ReplacePixels
This commit is contained in:
parent
31f15bc5ad
commit
62210c89f3
@ -86,6 +86,11 @@ func (i *Image) ensureFramebuffer() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *Image) ReplacePixels(p []byte, x, y, width, height int) {
|
func (i *Image) ReplacePixels(p []byte, x, y, width, height int) {
|
||||||
|
if i.screen {
|
||||||
|
// The screen image doesn't have a texture to replace pixels.
|
||||||
|
panic("not reached")
|
||||||
|
}
|
||||||
|
|
||||||
// glFlush is necessary on Android.
|
// glFlush is necessary on Android.
|
||||||
// glTexSubImage2D didn't work without this hack at least on Nexus 5x and NuAns NEO [Reloaded] (#211).
|
// glTexSubImage2D didn't work without this hack at least on Nexus 5x and NuAns NEO [Reloaded] (#211).
|
||||||
i.driver.context.flush()
|
i.driver.context.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user