mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
graphicsdriver/opengl: Add error checks
This commit is contained in:
parent
e725c7ee78
commit
8285fbfac9
@ -39,6 +39,10 @@ func (s *pboState) mapPBO(img *Image) {
|
|||||||
if img.pbo == *new(buffer) {
|
if img.pbo == *new(buffer) {
|
||||||
img.pbo = img.driver.context.newPixelBufferObject(w, h)
|
img.pbo = img.driver.context.newPixelBufferObject(w, h)
|
||||||
}
|
}
|
||||||
|
if img.pbo == *new(buffer) {
|
||||||
|
panic("opengl: newPixelBufferObject failed")
|
||||||
|
}
|
||||||
|
|
||||||
s.image = img
|
s.image = img
|
||||||
s.mappedPBO = img.driver.context.mapPixelBuffer(img.pbo, img.textureNative)
|
s.mappedPBO = img.driver.context.mapPixelBuffer(img.pbo, img.textureNative)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user