public static ShaderProgram CreateProgram(IGraphicsContext context, string vertexSource, string fragmentSource)
        {
            int vertID = context.CreateShader(ShaderType.VertexShader);
            int fragID = context.CreateShader(ShaderType.FragmentShader);


            context.ShaderSource(vertID, vertexSource);
            context.ShaderSource(fragID, fragmentSource);

            context.CompileShader(vertID);
            context.CompileShader(fragID);

            Debug.LogInfo(context.GetShaderInfoLog(vertID));
            Debug.LogInfo(context.GetShaderInfoLog(fragID));

            int programID = context.CreateProgram();

            context.AttachShader(programID, vertID);
            context.AttachShader(programID, fragID);

            context.LinkProgram(programID);

            Debug.LogInfo(context.GetProgramInfoLog(programID));

            return(new ShaderProgram(context, vertID, fragID, programID));
        }
        public static ShaderProgram CreateProgram(IGraphicsContext context, string vertexSource, string fragmentSource)
        {
            int vertID = context.CreateShader(ShaderType.VertexShader);
            int fragID = context.CreateShader(ShaderType.FragmentShader);

            context.ShaderSource(vertID, vertexSource);
            context.ShaderSource(fragID, fragmentSource);

            context.CompileShader(vertID);
            context.CompileShader(fragID);

            Debug.LogInfo(context.GetShaderInfoLog(vertID));
            Debug.LogInfo(context.GetShaderInfoLog(fragID));

            int programID = context.CreateProgram();

            context.AttachShader(programID, vertID);
            context.AttachShader(programID, fragID);

            context.LinkProgram(programID);

            Debug.LogInfo(context.GetProgramInfoLog(programID));

            return new ShaderProgram(context, vertID, fragID, programID);
        }
 public void ShaderSource(int id, string src)
 {
     forwarding.ShaderSource(id, src);
     CheckGLError();
     GLCALLS++;
 }