From 14e6e4c92bc884e80f84b05fbfe93463f963ced4 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 21 Feb 2016 01:57:05 +0900 Subject: [PATCH] graphics: Fix go-gl usage for Go1.6 --- internal/graphics/opengl/context.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/graphics/opengl/context.go b/internal/graphics/opengl/context.go index 35f9887d9..476b537f0 100644 --- a/internal/graphics/opengl/context.go +++ b/internal/graphics/opengl/context.go @@ -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