anchor.diff:    vertex_data[9] := x;   vertex_data[10] := y+h;
     vertex_data[11] := x;  vertex_data[12] := y;
   
  -  u := 1;
  -  v := 1;
  -
  -  case mir of
  -    0:begin
  -        uv_data[1] := 0;   uv_data[2] := 0;
  -        uv_data[3] := u;   uv_data[4] := 0;
  -        uv_data[5] := u;   uv_data[6] := v;
  -
  -        uv_data[7] := u;   uv_data[8] := v;
  -        uv_data[9] := 0;   uv_data[10] := v;
  -        uv_data[11] := 0;   uv_data[12] := 0;
  -    end;
  -    1: begin
  -          uv_data[1] := u;   uv_data[2] := 0;
  -          uv_data[3] := 0;   uv_data[4] := 0;
  -          uv_data[5] := 0;   uv_data[6] := v;
  -
  -          uv_data[7] := 0;   uv_data[8] := v;
  -          uv_data[9] := u;   uv_data[10] := v;
  -          uv_data[11] := u;   uv_data[12] := 0;
  -      end;
  -    2: begin
  -          uv_data[1] := 0;   uv_data[2] := v;
  -          uv_data[3] := u;   uv_data[4] := v;
  -          uv_data[5] := u;   uv_data[6] := 0;
  -
  -          uv_data[7] := u;   uv_data[8] := 0;
  -          uv_data[9] := 0;   uv_data[10] := 0;
  -          uv_data[11] := 0;   uv_data[12] := v;
  -      end;
  -    3:begin
  -        uv_data[1] := u;   uv_data[2] := v;
  -        uv_data[3] := 0;   uv_data[4] := v;
  -        uv_data[5] := 0;   uv_data[6] := 0;
  -
  -        uv_data[7] := 0;   uv_data[8] := 0;
  -        uv_data[9] := u;   uv_data[10] := 0;
  -        uv_data[11] := u;   uv_data[12] := v;
  -      end;
  -   end;
  -
       glActiveTexture(GL_TEXTURE0);
       glBindTexture(GL_TEXTURE_2D,ASprite.TextureID);
   
       glActiveTexture(GL_TEXTURE1);
       glBindTexture(GL_TEXTURE_1D,ASprite.PaletteID);
  +
   
   
   
  
positive.code: 
  { TShaderContext }
  
  destructor TShaderContext.Destroy;
  begin
    glDeleteProgram(DefaultProgram);
  
negative.code:   TShaderContext = class
    private
      const
         DEFAULT_BUFFER:packed array[1..12] of GLfloat = (0,0,0,0,0,0, 0,0,0,0,0,0);//deprecated
    private
      FCurrentProgram: GLuint;
      EmptyBufferData:array of GLfloat; //used to initialize VBO
    private
  
      DefaultProgram: GLuint;
  