Example #1
0
 private void CheckTexture(LTexture texture)
 {
     CheckDrawing();
     if (!texture.isLoaded)
     {
         texture.LoadTexture();
     }
     LTexture tex2d = texture.GetParent();
     if (tex2d != null)
     {
         if (tex2d != lastTexture)
         {
             Submit();
             lastTexture = tex2d;
         }
         else if (idx == vertices.Length)
         {
             Submit();
         }
         invTexWidth = (1f / texture.Width) * texture.widthRatio;
         invTexHeight = (1f / texture.Height) * texture.heightRatio;
     }
     else if (texture != lastTexture)
     {
         Submit();
         lastTexture = texture;
         invTexWidth = (1f / texture.Width) * texture.widthRatio;
         invTexHeight = (1f / texture.Height) * texture.heightRatio;
     }
     else if (idx == vertices.Length)
     {
         Submit();
     }
 }