func VertexShader(s string) gl.Uint { shader := gl.CreateShader(gl.VERTEX_SHADER) gl.ShaderSource(shader, 1, &s, nil) gl.CompileShader(shader) var stat gl.Int gl.GetShaderiv(shader, gl.COMPILE_STATUS, &stat) if stat != 0 { log.Fatalln(stat) } return shader }
func FragmentShader(s string) uint32 { shader := gl.CreateShader(gl.FRAGMENT_SHADER) gl.ShaderSource(shader, 1, &s, nil) gl.CompileShader(shader) var stat int32 gl.GetShaderiv(shader, gl.COMPILE_STATUS, &stat) if stat != 0 { log.Fatalln(stat) } return shader }