示例#1
0
 private void DeleteShaders()
 {
     if (this.program != null)
     {
         this.program.Unbind();
         Utility.CheckGLError();
         this.program.Delete();
         Utility.CheckGLError();
         this.program = null;
     }
 }
示例#2
0
            private void CreateShaders()
            {
                this.program          = new CSharpGL.Objects.Shaders.ShaderProgram();
                this.attributePositon = 0;
                this.attributeUV      = 1;
                this.attributeColor   = 2;
                this.attributeMap     = new Dictionary <uint, string>
                {
                    { 0, "Position" },
                    { 1, "UV" },
                    { 2, "Color" }
                };
                this.program.Create(this.vertexShaderSource, this.fragmentShaderSource, this.attributeMap);

                Utility.CheckGLError();
            }