public BasicFillShader(CanvasToShaderSharedResource canvasShareResource)
            : base(canvasShareResource)
        {
            //----------------
            //vertex shader source
            string vs = @"        
            attribute vec2 a_position; 
            uniform mat4 u_mvpMatrix;
            uniform vec4 u_solidColor;              
            varying vec4 v_color;
 
            void main()
            {
                gl_Position = u_mvpMatrix* vec4(a_position[0],a_position[1],0,1); 
                v_color= u_solidColor;
            }
            ";
            //fragment source
            string fs = @"
                precision mediump float;
                varying vec4 v_color; 
                void main()
                {
                    gl_FragColor = v_color;
                }
            ";
            if (!shaderProgram.Build(vs, fs))
            {
                throw new NotSupportedException();
            }

            a_position = shaderProgram.GetAttrV2f("a_position");
            u_matrix = shaderProgram.GetUniformMat4("u_mvpMatrix");
            u_solidColor = shaderProgram.GetUniform4("u_solidColor");
        }
 protected bool BuildProgram(string vs, string fs)
 {
     //---------------------
     if (!shaderProgram.Build(vs, fs))
     {
         return false;
     }
     //-----------------------
     a_position = shaderProgram.GetAttrV3f("a_position");
     a_texCoord = shaderProgram.GetAttrV2f("a_texCoord");
     u_matrix = shaderProgram.GetUniformMat4("u_mvpMatrix");
     s_texture = shaderProgram.GetUniform1("s_texture");
     OnProgramBuilt();
     return true;
 }