anchor.diff:  
     TLocalState = class
     private
  -    SpriteVAO: array[0..3] of GLuint;
  +    SpriteVAO: GLuint;
       RectVAO: GLuint;
   
       FCurrentProgram: GLuint;
  
positive.code:   glBindTexture(GL_TEXTURE_1D,ASprite.PaletteID);
  
    glBindBuffer(GL_ARRAY_BUFFER,GlobalContextState.CoordsBuffer);
    glBufferSubData(GL_ARRAY_BUFFER,0,  sizeof(vertex_data),@vertex_data);
    glBindBuffer(GL_ARRAY_BUFFER,0);
  
    Assert(glIsVertexArray(SpriteVAO[mir]) = GL_TRUE, 'invalid SpriteVAO');
  
    glBindVertexArray(SpriteVAO[mir]);
  
    glUniformMatrix4fv(GlobalContextState.DefaultTranslateMatrixUniform,1,GL_TRUE,@FTranslateMaxrix.data);
  
    glEnableVertexAttribArray(COORDS_ATTRIB_LOCATION);
    glEnableVertexAttribArray(UV_ATTRIB_LOCATION);
    glDrawArrays(GL_TRIANGLES,0,6);  //todo: use triangle strip
    glDisableVertexAttribArray(UV_ATTRIB_LOCATION);
    glDisableVertexAttribArray(COORDS_ATTRIB_LOCATION);
  
  
  
    glBindVertexArray(0);
  
   // CheckGLErrors('render sprite mir='+IntToStr(mir)+ ' xy='+IntToStr(ASprite.X)+' '+ IntToStr(ASprite.Y));
  
  
negative.code: 
    Assert(Assigned(CurrentContextState), 'no current context state');
  
  
    glBindVertexArray(CurrentContextState.SpriteVAO);
  
  
    glEnableVertexAttribArray(COORDS_ATTRIB_LOCATION);
  