func VertexShader(s string) uint { shader := gl.CreateShader(gl.VERTEX_SHADER) gl.ShaderSource(shader, s) gl.CompileShader(shader) if gl.GetShaderiv(shader, gl.COMPILE_STATUS, make([]int32, 1))[0] == 0 { fmt.Printf("VSH:\n%s\n", gl.GetShaderInfoLog(shader, 1000)) } return shader }
func FragmentShader(s string) uint { shader := gl.CreateShader(gl.FRAGMENT_SHADER) gl.ShaderSource(shader, s) gl.CompileShader(shader) if stat := gl.GetShaderiv(shader, gl.COMPILE_STATUS, make([]int32, 1)); stat[0] == 0 { fmt.Printf("FSH:\n%s\n", gl.GetShaderInfoLog(shader, 1000)) } return shader }