anchor.diff:  
   procedure TRenderTerrain.EndVBO;
   begin
  +  if not fUseVBO then Exit;
  +
     glBindBuffer(GL_ARRAY_BUFFER, 0);
     glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
   end;
  
positive.code: 
  
  procedure TRenderTerrain.DoLighting;
  begin
    glColor4f(1, 1, 1, 1);
    //Render highlights
    glBlendFunc(GL_DST_COLOR, GL_ONE);
    glBindTexture(GL_TEXTURE_2D, fTextG);
  
    //Setup vertex and UV layout and offsets
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(3, GL_FLOAT, SizeOf(TVertice), Pointer(0));
    glClientActiveTexture(GL_TEXTURE0);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glTexCoordPointer(1, GL_FLOAT, SizeOf(TVertice), Pointer(12));
  
  //Here and above OGL requests Pointer, but in fact it's just a number (offset within Array)
    glDrawElements(GL_TRIANGLES, Length(fInd), GL_UNSIGNED_INT, Pointer(0));
  
    glDisableClientState(GL_VERTEX_ARRAY);
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  end;
  
  
  //Render shadows and FOW at once
  procedure TRenderTerrain.DoShadows;
  begin
    glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
    glBindTexture(GL_TEXTURE_2D, fTextG);
  
    //Setup vertex and UV layout and offsets
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(3, GL_FLOAT, SizeOf(TVertice), Pointer(0));
    glClientActiveTexture(GL_TEXTURE0);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glTexCoordPointer(1, GL_FLOAT, SizeOf(TVertice), Pointer(16));
  
    //Here and above OGL requests Pointer, but in fact it's just a number (offset within Array)
    glDrawElements(GL_TRIANGLES, Length(fInd), GL_UNSIGNED_INT, Pointer(0));
  
    glDisableClientState(GL_VERTEX_ARRAY);
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glBindTexture(GL_TEXTURE_2D, 0);
  end;
  
  
  procedure TRenderTerrain.Render(aRect: TKMRect; AnimStep: Integer; aFOW: TKMFogOfWar);
  var
    I,K: Integer;
  
negative.code:     pData[I] := EnsureRange(Round(I * 1.0625 - 16), 0, 255) * 65793 or $FF000000;
  
    fTextG := TRender.GenTexture(256, 1, @pData[0], tf_RGBA8);
  
    fUseVBO := GL_VERSION_1_5;
  
    if fUseVBO then
    begin
      glGenBuffers(1, @fVtxShd);
      glGenBuffers(1, @fIndShd);
    end;
  end;
  
  
  