anchor.diff:          GL.BindTexture( TextureTarget.Texture2D, texhdl )
           (*Uploads data to the texture specified for the active texture unit*)
           GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba
  -                            , bm.Width, bm.Height, 0, PixelFormat.Bgra
  +                            , bmdata.Width, bmdata.Height, 0, PixelFormat.Bgra
                               , PixelType.UnsignedByte, bytes)
   
  -        Some( PathTexture( texhdl, bm.Width, bm.Height, path ) )
  +        Some( PathTexture( texhdl, bmdata.Width, bmdata.Height, path ) )
       with
           | _ -> None
        
  -    
  +
  +let buildMVPFromModel( rotation, scale, translation:Vector2, aspect:float32 ) =
  +    let rotation = cos(rotation),sin(rotation)
  +    let mutable rotMat = Matrix4.Identity;
  +    rotMat.Row0 <- Vector4(fst(rotation), -1.0f * snd(rotation), 0.0f, 0.0f)
  +    rotMat.Row1 <- Vector4(snd(rotation), fst(rotation), 0.0f, 0.0f)
  +    let mutable scaleMat = Matrix4.Identity
  +    scaleMat.Row0 <- Vector4( scale, 0.0f, 0.0f, 0.0f )
  +    scaleMat.Row1 <- Vector4( 0.0f, scale, 0.0f, 0.0f )
  +    scaleMat.Row2 <- Vector4( 0.0f, 0.0f, scale, 0.0f )
  +    let mutable translationMat = Matrix4.Identity
  +    translationMat.Row3 <- Vector4( translation.X, translation.Y, 0.0f, 1.0f )
  +
  +    let mutable projection = Matrix4.Identity
  +    projection.Row1 <- Vector4( 0.0f, aspect, 0.0f, 0.0f )
  +
  +    let model = Matrix4.Mult( Matrix4.Mult( rotMat, scaleMat ), translationMat )
  +    let mvp = Matrix4.Mult(projection, model )
  +    mvp
   
   
   type RenderContext(inModel:ModelData, inDest:Image) =
  
positive.code: open OpenTK.Graphics.OpenGL
  open System.Runtime.InteropServices
  open System.IO
  
  type public GladeObj () =
      [<Widget>] [<DefaultValue>] val mutable mainwindow : Window
  
negative.code:         else
              None
  
      member this.setUniform( name, value:int ) =
          let uniLoc = this.getUniLoc( name )
          if uniLoc.IsSome then
              GL.Uniform1( uniLoc.Value, value )
  
      member this.setUniform( name, value:Matrix4 byref ) =
          let uniLoc = this.getUniLoc( name )
          if uniLoc.IsSome then
              GL.UniformMatrix4( uniLoc.Value, false, &value )
          
  
  let compileShader( code, stype ) =
  