graphics: Fix go-gl usage for Go1.6

This commit is contained in:
Hajime Hoshi 2016-02-21 01:57:05 +09:00
parent 5e8a91338e
commit 14e6e4c92b

View File

@ -176,8 +176,9 @@ func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error
return 0, errors.New("glCreateShader failed")
}
glSource := gl.Str(source + "\x00")
gl.ShaderSource(uint32(s), 1, &glSource, nil)
cSources, free := gl.Strs(source + "\x00")
gl.ShaderSource(uint32(s), 1, cSources, nil)
free()
gl.CompileShader(s)
var v int32