graphicsdriver/opengl: Add program error info to the error

This commit is contained in:
Hajime Hoshi
2020-08-01 18:39:17 +09:00
parent a4334c5464
commit 38dcadb233
5 changed files with 40 additions and 8 deletions

View File

@@ -395,7 +395,8 @@ func (c *context) newProgram(shaders []shader, attributes []string) (program, er
gl.Call("linkProgram", v)
if !gl.Call("getProgramParameter", v, linkStatus).Bool() {
return program{}, errors.New("opengl: program error")
info := gl.Call("getProgramInfoLog", v).String()
return program{}, fmt.Errorf("opengl: program error: %s", info)
}
id := c.lastProgramID