anchor.diff:          OpenGL.Gl.DeleteTextures texture
   
       /// Attempt to create physically-based geometry from an assimp mesh.
  -    let TryCreatePhysicallyBasedGeometry (mesh : Assimp.Mesh) =
  +    let TryCreatePhysicallyBasedGeometry (renderable, mesh : Assimp.Mesh) =
   
           // ensure required data is available
           if  mesh.HasVertices &&
  
positive.code:                     positionMax.Z <- max positionMax.Z position.Z
                  let bounds = box3 positionMin (positionMax - positionMin)
  
                  // populate index data
                  let indexList = SegmentedList.make ()
                  for face in mesh.Faces do
                      if face.IndexCount = 3 then
                          for index in face.Indices do
                              SegmentedList. add index indexList
                  let indexData = Seq.toArray indexList
  
                  // initialize vao
                  let vao = OpenGL.Gl.GenVertexArray ()
                  OpenGL.Gl.BindVertexArray vao
                  Assert ()
  
                  // create vertex buffer
                  let vertexBuffer = OpenGL.Gl.GenBuffer ()
                  let normalOffset =      (3 (*position*)) * sizeof<single>
                  let texCoordsOffset =   (3 (*position*) + 3 (*normal*)) * sizeof<single>
                  let vertexSize =        (3 (*position*) + 3 (*normal*) + 2 (*texCoords*)) * sizeof<single>
                  OpenGL.Gl.BindBuffer (OpenGL.BufferTarget.ArrayBuffer, vertexBuffer)
                  let vertexDataPtr = GCHandle.Alloc (vertexData, GCHandleType.Pinned)
                  try OpenGL.Gl.BufferData (OpenGL.BufferTarget.ArrayBuffer, uint (vertexData.Length * sizeof<single>), vertexDataPtr.AddrOfPinnedObject (), OpenGL.BufferUsage.StaticDraw)
                  finally vertexDataPtr.Free ()
                  OpenGL.Gl.EnableVertexAttribArray 0u
                  OpenGL.Gl.VertexAttribPointer (0u, 3, OpenGL.VertexAttribType.Float, false, vertexSize, nativeint 0)
                  OpenGL.Gl.EnableVertexAttribArray 1u
                  OpenGL.Gl.VertexAttribPointer (1u, 3, OpenGL.VertexAttribType.Float, false, vertexSize, nativeint normalOffset)
                  OpenGL.Gl.EnableVertexAttribArray 2u
                  OpenGL.Gl.VertexAttribPointer (2u, 2, OpenGL.VertexAttribType.Float, false, vertexSize, nativeint texCoordsOffset)
                  Assert ()
  
                  // create model buffer
                  let modelBuffer = OpenGL.Gl.GenBuffer ()
                  OpenGL.Gl.BindBuffer (OpenGL.BufferTarget.ArrayBuffer, modelBuffer)
                  let modelDataPtr = GCHandle.Alloc (m4Identity.ToArray (), GCHandleType.Pinned)
                  try OpenGL.Gl.BufferData (OpenGL.BufferTarget.ArrayBuffer, uint (16 * sizeof<single>), modelDataPtr.AddrOfPinnedObject (), OpenGL.BufferUsage.StreamDraw)
                  finally modelDataPtr.Free ()
                  OpenGL.Gl.EnableVertexAttribArray 3u
                  OpenGL.Gl.VertexAttribPointer (3u, 4, OpenGL.VertexAttribType.Float, false, 16 * sizeof<single>, nativeint 0)
                  OpenGL.Gl.VertexAttribDivisor (3u, 1u)
                  OpenGL.Gl.EnableVertexAttribArray 4u
                  OpenGL.Gl.VertexAttribPointer (4u, 4, OpenGL.VertexAttribType.Float, false, 16 * sizeof<single>, nativeint (4 * sizeof<single>))
                  OpenGL.Gl.VertexAttribDivisor (4u, 1u)
                  OpenGL.Gl.EnableVertexAttribArray 5u
                  OpenGL.Gl.VertexAttribPointer (5u, 4, OpenGL.VertexAttribType.Float, false, 16 * sizeof<single>, nativeint (8 * sizeof<single>))
                  OpenGL.Gl.VertexAttribDivisor (5u, 1u)
                  OpenGL.Gl.EnableVertexAttribArray 6u
                  OpenGL.Gl.VertexAttribPointer (6u, 4, OpenGL.VertexAttribType.Float, false, 16 * sizeof<single>, nativeint (12 * sizeof<single>))
                  OpenGL.Gl.VertexAttribDivisor (6u, 1u)
                  Assert ()
  
                  // create index buffer
                  let indexBuffer = OpenGL.Gl.GenBuffer ()
                  OpenGL.Gl.BindBuffer (OpenGL.BufferTarget.ElementArrayBuffer, indexBuffer)
                  let indexDataSize = uint (indexData.Length * sizeof<uint>)
                  let indexDataPtr = GCHandle.Alloc (indexData, GCHandleType.Pinned)
                  try OpenGL.Gl.BufferData (OpenGL.BufferTarget.ElementArrayBuffer, indexDataSize, indexDataPtr.AddrOfPinnedObject (), OpenGL.BufferUsage.StaticDraw)
                  finally indexDataPtr.Free ()
                  Assert ()
  
                  // finalize vao
                  OpenGL.Gl.BindVertexArray 0u
                  Assert ()
              
                  // compute vertices
                  let vertices = Array.zeroCreate (vertexData.Length / 3)
                  for i in 0 .. dec vertices.Length do
                      let j = i * 3
                      let vertex = v3 vertexData.[j] vertexData.[j+1] vertexData.[j+2]
                      vertices.[i] <- vertex
  
                  // make physically based geometry
                  let geometry =
                      { Bounds = bounds
                        Vertices = vertices
                        VertexBuffer = vertexBuffer
                        ModelBuffer = modelBuffer
                        IndexBuffer = indexBuffer
                        PrimitiveType = OpenGL.PrimitiveType.Triangles
                        ElementCount = indexData.Length
                        PhysicallyBasedVao = vao }
  
                  // success
  
negative.code:     /// Describes some physically-based geometry that's loaded into VRAM.
      type [<StructuralEquality; NoComparison>] PhysicallyBasedGeometry =
          { Bounds : Box3
            PrimitiveType : OpenGL.PrimitiveType
            ElementCount : int
            Vertices : Vector3 array
            VertexBuffer : uint
            ModelBuffer : uint
            IndexBuffer : uint
            PhysicallyBasedVao : uint }
  
      type [<CustomEquality; NoComparison; Struct>] PhysicallyBasedSurface =
  