public void Setup()
        {
            program = new GLProgram("Shader", "Shader");

            program.AddAttribute("position");
            program.AddAttribute("textureCoordinate");
            program.AddAttribute("normalsAttribute");

            if (!program.Link())
            {
                Console.WriteLine("Link failed.");
                Console.WriteLine(String.Format("Program Log: {0}", program.ProgramLog()));
                Console.WriteLine(String.Format("Fragment Log: {0}", program.FragmentShaderLog()));
                Console.WriteLine(String.Format("Vertex Log: {0}", program.VertexShaderLog()));

                (View as GLView).StopAnimation();
                program = null;

                return;
            }

            positionAttribute          = program.GetAttributeIndex("position");
            textureCoordinateAttribute = program.GetAttributeIndex("textureCoordinate");
            normalsAttribute           = program.GetAttributeIndex("normalsAttribute");

            matrixUniform            = program.GetUniformIndex("matrix");
            textureUniform           = program.GetUniformIndex("texture");
            lightDirectionUniform    = program.GetUniformIndex("lightDirection");
            lightDiffuseColorUniform = program.GetUniformIndex("lightDiffuseColor");

            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.CullFace);
            GL.Enable(EnableCap.Texture2D);
            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactorSrc.One, BlendingFactorDest.Zero);

            texture = new GLTexture("DieTexture.png");
        }
		public void Setup ()
		{
			program = new GLProgram ("Shader", "Shader");

			program.AddAttribute ("position");
			program.AddAttribute ("textureCoordinate");
			program.AddAttribute ("normalsAttribute");

			if (!program.Link ()) {
				Console.WriteLine ("Link failed.");
				Console.WriteLine (String.Format ("Program Log: {0}", program.ProgramLog ()));
				Console.WriteLine (String.Format ("Fragment Log: {0}", program.FragmentShaderLog ()));
				Console.WriteLine (String.Format ("Vertex Log: {0}", program.VertexShaderLog ()));

				(View as GLView).StopAnimation ();
				program = null;

				return;
			}

			positionAttribute = program.GetAttributeIndex ("position");
			textureCoordinateAttribute = program.GetAttributeIndex ("textureCoordinate");
			normalsAttribute = program.GetAttributeIndex ("normalsAttribute");

			matrixUniform = program.GetUniformIndex ("matrix");
			textureUniform = program.GetUniformIndex ("texture");
			lightDirectionUniform = program.GetUniformIndex ("lightDirection");
			lightDiffuseColorUniform = program.GetUniformIndex ("lightDiffuseColor");

			GL.Enable (EnableCap.DepthTest);
			GL.Enable (EnableCap.CullFace);
			GL.Enable (EnableCap.Texture2D);
			GL.Enable (EnableCap.Blend);
			GL.BlendFunc (BlendingFactorSrc.One, BlendingFactorDest.Zero);

			texture = new GLTexture ("DieTexture.png");
		}