anchor.diff:          /// <param name="gl">The OpenGL instance.</param>
           /// <param name="useToonShader">if set to <c>true</c> use the toon shader, otherwise use a per-pixel shader.</param>
           member x.RenderRetainedMode(gl : OpenGL, useToonShader) =
  -        
  -            
  -            
  -            //  Setup the modelview matrix.
  -            gl.MatrixMode(OpenGL.GL_TRIANGLES)
  +
  +            gl.MatrixMode(OpenGL.GL_MODELVIEW)
               gl.LoadIdentity()
               gl.MultMatrix(modelviewMatrix.to_array())
  -            
  +                                                                        
  +            //GenerateGeometry(gl, positionAttribute, normalAttribute)
  +            //x.Initialise(gl)
               gl.Begin(BeginMode.Triangles)
  -            [|0 .. vertexCount-1|]// indices
  -            |> Array.iter (fun x -> 
  +            //[|0 .. vertexCount-1|]// indices
  +            indices
  +            |> Array.iter (fun y -> 
  +                let x = (min (int y) (vertexCount - 1))
                   gl.Vertex(vertices.[x].x, vertices.[x].y, vertices.[x].z)
                   gl.Normal(normals.[x].x, normals.[x].y, normals.[x].z))
  -            gl.End()            
  -            
  -                        
  -            GenerateGeometry(gl, positionAttribute, normalAttribute)
  -
   
               //  Get a reference to the appropriate shader.
               let shader = if useToonShader then shaderToon else shaderPerPixel
  +
  +            //indexBuffer.Bind(gl)
  +            //indexBuffer.SetData(gl, indices) 
   
               //  Use the shader program.
               shader.Bind(gl)
  
positive.code:         let mutable dv = new vec3()
          dv.x <- -1.5f*b*(Sin (1.5f*u))*(Cos u) - (a + b*(Cos (1.5f*u))*(Sin u))
          dv.y <- -1.5f*b*(Sin (1.5f*u))*(Sin u) + (a + b*(Cos (1.5f*u))*(Cos u))
          dv.z <- 1.5f*c*(Cos (1.5f*u))
              
          let q = glm.normalize(dv)
          let qvn = glm.normalize(new vec3(q.y, -q.x, 0.0f))
  
negative.code:             shader.SetUniform1(gl, "Shininess", 50.f)
  
              //  Set the light position.
              shader.SetUniform3(gl, "LightPosition", 0.25f, 0.25f, 1.f)
  
              //  Set the matrices.
              shader.SetUniformMatrix4(gl, "Projection", projectionMatrix.to_array())
              shader.SetUniformMatrix4(gl, "Modelview", modelviewMatrix.to_array())
              shader.SetUniformMatrix3(gl, "NormalMatrix", normalMatrix.to_array())
  
              //  Bind the vertex buffer array.
              vertexBufferArray.Bind(gl)      
              
              //  Draw the elements.
              //shader.GetInfoLog(gl) |> printfn "shader.GetInfoLog %s"
              //gl.UseProgram(shader.ShaderProgramObject)
              gl.DrawElements(OpenGL.GL_TRIANGLES, indices.Length, OpenGL.GL_UNSIGNED_SHORT, System.IntPtr(int indices.[0]))
              //gl.DrawArrays(OpenGL.GL_TRIANGLES, (int indices.[0]), indices.Length)
              //  Unbind the shader.
              shader.Unbind(gl)
              vertexBufferArray.Unbind(gl)
              //indexBuffer.Unbind(gl)
              gl.End()
  
  module CelShadingExample =
      let mutable theta = 0.f
      let scene = new TrefoilKnot.Scene()
      let axies = new Axies()
      let mutable comboRenderModeSelectedIndex = 0
      let mutable checkBoxUseToonShaderIsChecked = false
      
       
      let OpenGLControl_OpenGLDraw(sender:obj, args : OpenGLEventArgs) =
          //  Get the OpenGL instance.
          let gl = args.OpenGL
  