mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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) {
|
||||
img.pbo = img.driver.context.newPixelBufferObject(w, h)
|
||||
}
|
||||
if img.pbo == *new(buffer) {
|
||||
panic("opengl: newPixelBufferObject failed")
|
||||
}
|
||||
|
||||
s.image = img
|
||||
s.mappedPBO = img.driver.context.mapPixelBuffer(img.pbo, img.textureNative)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user