anchor.diff:     glGenVertexArrays(1,@RectVAO);
      glBindVertexArray(RectVAO);
      glBindBuffer(GL_ARRAY_BUFFER,GlobalContextState.CoordsBuffer);
  -   glVertexAttribPointer(COORDS_ATTRIB_LOCATION, 2, GL_FLOAT, GL_FALSE, 0,nil);
  +   glVertexAttribPointer(GlobalContextState.FCoordAttribLocation, 2, GL_FLOAT, GL_FALSE, 0,nil);
      glBindBuffer(GL_ARRAY_BUFFER, 0);
      glBindVertexArray(0);
   end;
  
positive.code:   glBindVertexArray(SpriteVAO);
  
    glBindBuffer(GL_ARRAY_BUFFER,GlobalContextState.CoordsBuffer);
    glVertexAttribPointer(COORDS_ATTRIB_LOCATION, 2, GL_FLOAT, GL_FALSE, 0,nil);
  
    glBindBuffer(GL_ARRAY_BUFFER,GlobalContextState.MirroredUVBuffer);
    glVertexAttribPointer(UV_ATTRIB_LOCATION, 2, GL_FLOAT, GL_FALSE, 0,nil);
  
    glBindBuffer(GL_ARRAY_BUFFER, 0);
  
  
negative.code: begin
    SetTranslation(0,0);
    glBindVertexArray(RectVAO);
    glEnableVertexAttribArray(GlobalContextState.FCoordAttribLocation);
    glDisableVertexAttribArray(GlobalContextState.FUVAttribLocation);
  end;
  
  procedure TLocalState.StartDrawingSprites;
  begin
    SetTranslation(0,0);
    glBindVertexArray(SpriteVAO);
    glEnableVertexAttribArray(GlobalContextState.FCoordAttribLocation);
    glEnableVertexAttribArray(GlobalContextState.FUVAttribLocation);
  end;
  
  procedure TLocalState.RenderSpriteMirrored(ASprite: TGLSprite; mir: UInt8);
  