anchor.diff:          /// </summary>
           /// <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) =
  -//        
  -//            //  Get a reference to the appropriate shader.
  -//            let shader = if useToonShader then shaderToon else shaderPerPixel
  -//
  -//            //  Use the shader program.
  -//            shader.Bind(gl)
  -//
  -//            //  Set the variables for the shader program.
  -//            shader.SetUniform3(gl, "DiffuseMaterial", 0.f, 0.75f, 0.75f)
  -//            shader.SetUniform3(gl, "AmbientMaterial", 0.04f, 0.04f, 0.04f)
  -//            shader.SetUniform3(gl, "SpecularMaterial", 0.5f, 0.5f, 0.5f)
  -//            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.
  -//            gl.DrawElements(OpenGL.GL_TRIANGLES, indices.Length, OpenGL.GL_UNSIGNED_SHORT, IntPtr.Zero)
  -//
  -//            //  Unbind the shader.
  -//            shader.Unbind(gl)
  -
  +        member x.RenderRetainedMode(gl : OpenGL, useToonShader) =
  +        
  +            
  +            
  +            //  Setup the modelview matrix.
  +            gl.MatrixMode(OpenGL.GL_TRIANGLES)
  +            gl.LoadIdentity()
  +            gl.MultMatrix(modelviewMatrix.to_array())
  +            
  +            gl.Begin(BeginMode.Triangles)
  +            [|0 .. vertexCount-1|]// indices
  +            |> Array.iter (fun x -> 
  +                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
  +
  +            //  Use the shader program.
  +            shader.Bind(gl)
  +
  +            //  Set the variables for the shader program.
  +            shader.SetUniform3(gl, "DiffuseMaterial", 0.f, 0.75f, 0.75f)
  +            shader.SetUniform3(gl, "AmbientMaterial", 0.04f, 0.04f, 0.04f)
  +            shader.SetUniform3(gl, "SpecularMaterial", 0.5f, 0.5f, 0.5f)
  +            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.
  +            gl.DrawElements(OpenGL.GL_TRIANGLES, indices.Length, OpenGL.GL_UNSIGNED_SHORT, System.IntPtr(int indices.[0]))  
  +
  +            //  Unbind the shader.
  +            shader.Unbind(gl)
  +            //vertexBufferArray.Unbind(gl)
   
   module CelShadingExample =
       let mutable theta = 0.f
  -    let mutable scene = new TrefoilKnot.Scene()
  -    let mutable axies = new Axies()
  +    let scene = new TrefoilKnot.Scene()
  +    let axies = new Axies()
       
   
       let OpenGLControl_OpenGLDraw(sender:obj, args : OpenGLEventArgs) =
  
positive.code:         /// Initialises the Scene.
          /// </summary>
          /// <param name="gl">The OpenGL instance.</param>
          member x.Initialise(gl) =
          
              //  We're going to specify the attribute locations for the position and normal, 
              //  so that we can force both shaders to explicitly have the same locations.
              let positionAttribute = 0u
              let normalAttribute = 1u
              let attributeLocations = new Dictionary<uint32, string>()
              attributeLocations.Add (positionAttribute, "Position")
              attributeLocations.Add (normalAttribute, "Normal")
  
  //            //  Create the per pixel shader.
  //            let shaderPerPixel = new ShaderProgram()
  //            do shaderPerPixel.Create(gl, 
  //                                     ManifestResourceLoader.LoadTextFile(@"CelShadingExample\Shaders\PerPixel.vert"), 
  //                                     ManifestResourceLoader.LoadTextFile(@"CelShadingExample\Shaders\PerPixel.frag"), 
  //                                     attributeLocations)
  //            
  //            //  Create the toon shader.
  //            let shaderToon = new ShaderProgram()
  //            do shaderToon.Create(gl,
  //                                 ManifestResourceLoader.LoadTextFile(@"CelShadingExample\Shaders\Toon.vert"),
  //                                 ManifestResourceLoader.LoadTextFile(@"CelShadingExample\Shaders\Toon.frag"), 
  //                                 attributeLocations)
              
              //  Generate the geometry and it's buffers.
              do GenerateGeometry(gl, positionAttribute, normalAttribute)
  
negative.code:     let vertexCount = slices * stacks
      let indexCount = vertexCount * 6
  
      let mutable vertices : vec3[] = Array.init<vec3> vertexCount (fun _ -> new vec3()) 
      let mutable normals : vec3[] = Array.init<vec3> vertexCount (fun _ -> new vec3())
      let mutable indices : uint16[] = Array.init<uint16> indexCount (fun _ -> 0us)
  
      let vertexBuffer = new VertexBuffer()
      let normalBuffer = new VertexBuffer()
  