mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-10-17 13:32:02 +08:00
graphicsdriver/opengl: Add program error info to the error
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user