anchor.diff:      fTextB: GLuint; //Contrast BW for FOW over color-coder
       fUseVBO: Boolean; //Wherever to render terrain through VBO (faster but needs GL1.5) or DrawCalls (slower but needs only GL1.1)
       fTilesVtx: array of TTileVertice; //Vertice cache for tiles
  -    fTilesInd: array of Integer;
  -    fVtxShd: GLUint;
  -    fIndShd: GLUint;
  +    fTilesInd: array of Integer;      //Indexes for tiles array
  +    fAnimTilesVtx: array of TAnimTileVertice; //Vertice cache for tiles animations (water/falls/swamp)
  +    fAnimTilesInd: array of Integer;          //Indexes for array tiles animation array
  +    fVtxTilesShd: GLUint;
  +    fIndTilesShd: GLUint;
  +    fVtxAnimTilesShd: GLUint;
  +    fIndAnimTilesShd: GLUint;
       fTileUVLookup: array [0..255, 0..3] of TUVRect;
  +    fLastBindVBOArrayType: TVBOArrayType;
       function GetTileUV(Index: Word; Rot: Byte): TUVRect;
  -    procedure UpdateVBO(aFOW: TKMFogOfWarCommon);
  +    procedure BindVBOArray(aVBOArrayType: TVBOArrayType);
  +    procedure UpdateVBO(aAnimStep: Integer; aFOW: TKMFogOfWarCommon);
       procedure DoTiles;
       procedure DoOverlays;
       procedure DoLighting;
  
positive.code: 
    SizeX := Max(fClipRect.Right - fClipRect.Left, 0);
    SizeY := Max(fClipRect.Bottom - fClipRect.Top, 0);
    H := 0;
    SetLength(fTilesVtx, (SizeX + 2) * 4 * (SizeY + 1));
    with gTerrain do
    if (MapX > 0) and (MapY > 0) then
    for I := 0 to SizeY do
    for K := 0 to SizeX+1 do
    begin
      tX := K + fClipRect.Left;
      tY := I + fClipRect.Top;
      TexC := fTileUVLookup[Land[tY, tX].Terrain, Land[tY, tX].Rotation mod 4];
  
      SetVertex(H, tX, tY, False, TexC[1][1], TexC[1][2]);
      SetVertex(H+1, tX, tY+1, True, TexC[2][1], TexC[2][2]);
      SetVertex(H+2, tX+1, tY+1, True, TexC[3][1], TexC[3][2]);
      SetVertex(H+3, tX+1, tY, False, TexC[4][1], TexC[4][2]);
  
      H := H + 4;
    end;
  
    H := 0;
    SetLength(fTilesInd, (SizeX+1) * (SizeY+1) * 6);
    for I := 0 to SizeY do
    for K := 0 to SizeX do
    begin
      Row := I * (SizeX + 2) * 4;
      fTilesInd[H+0] := Row + K * 4;
      fTilesInd[H+1] := Row + K * 4 + 1;
      fTilesInd[H+2] := Row + K * 4 + 2;
      fTilesInd[H+3] := Row + K * 4;
      fTilesInd[H+4] := Row + K * 4 + 3;
      fTilesInd[H+5] := Row + K * 4 + 2;
      H := H + 6;
    end;
  end;
  
  
negative.code: uses
    KM_Render;
  
  type
    TAnimLayer = (alWater, alFalls, alSwamp);
  
  
  constructor TRenderTerrain.Create;
  var
  