added an error if glGenTextures fails
This commit is contained in:
parent
5ce888f8b9
commit
9f92f2c5c4
1 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,10 @@ func (b *GoGLBackend) LoadImage(src image.Image) (backendbase.Image, error) {
|
|||
|
||||
var tex uint32
|
||||
gl.GenTextures(1, &tex)
|
||||
if tex == 0 {
|
||||
return nil, errors.New("glGenTextures failed")
|
||||
}
|
||||
|
||||
gl.ActiveTexture(gl.TEXTURE0)
|
||||
gl.BindTexture(gl.TEXTURE_2D, tex)
|
||||
if src == nil {
|
||||
|
|
Loading…
Reference in a new issue