package com.google.android.m4b.maps.bp;

import com.google.android.m4b.maps.am.b;
import com.google.android.m4b.maps.ar.d;
import com.google.android.m4b.maps.bo.e;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import javax.microedition.khronos.opengles.GL11;

public class i extends g
{
  private final int[] k = new int[1];
  private volatile long l = -1L;

  public i(int paramInt)
  {
    super(paramInt);
  }

  private i(int paramInt1, int paramInt2, int paramInt3)
  {
    super(paramInt1, 5122, paramInt3, true);
  }

  public i(int paramInt, boolean paramBoolean)
  {
    super(paramInt, true);
  }

  public static i b(int paramInt1, int paramInt2)
  {
    return new i(paramInt1, 5122, 1);
  }

  private boolean f(e parame)
  {
    if (this.e == null)
      e(parame);
    if (this.e.limit() == 0)
      return false;
    GL11 localGL11 = (GL11)parame.x();
    localGL11.glGenBuffers(1, this.k, 0);
    localGL11.glBindBuffer(34962, this.k[0]);
    this.a = (this.e.limit() * this.g);
    localGL11.glBufferData(34962, this.a, this.e, 35044);
    this.e = null;
    return true;
  }

  public void a(e parame)
  {
    super.a(parame);
    this.k[0] = 0;
  }

  public final void a(e parame, int paramInt)
  {
    this.l = e.a(parame);
    if (!parame.F())
      super.a(parame, paramInt);
    while ((this.k[0] == 0) && (!f(parame)))
      return;
    GL11 localGL11 = (GL11)parame.x();
    localGL11.glBindBuffer(34962, this.k[0]);
    localGL11.glTexCoordPointer(2, this.f, 0, paramInt * 2 * this.g);
    localGL11.glBindBuffer(34962, 0);
  }

  public final void b(e parame)
  {
    if (this.k[0] != 0)
    {
      e locale = e.b(this.l);
      if ((locale == parame) && (locale != null))
        ((GL11)locale.x()).glDeleteBuffers(1, this.k, 0);
      this.k[0] = 0;
      this.a = 0;
    }
    this.l = e.a(parame);
  }

  public final int c()
  {
    int i = 56;
    if (this.j != null)
      i = 56 + 4 * this.j.b();
    while (this.b == null)
      return i;
    return 56 + (16 + 4 * this.b.length);
  }

  public final void d(e parame)
  {
    this.l = e.a(parame);
    if (!parame.F())
      super.d(parame);
    while ((this.k[0] == 0) && (!f(parame)))
      return;
    GL11 localGL11 = (GL11)parame.x();
    localGL11.glBindBuffer(34962, this.k[0]);
    localGL11.glTexCoordPointer(2, this.f, 0, 0);
    localGL11.glBindBuffer(34962, 0);
  }

  protected final void e(e parame)
  {
    if (parame.F())
    {
      int i = 2 * this.d;
      if (this.f == 5122)
      {
        this.e = parame.J().b();
        if (this.j == null)
          a((ShortBuffer)this.e, i);
      }
      while (true)
      {
        this.e.limit(i);
        this.e.position(0);
        if (!b.a)
        {
          if (this.j != null)
          {
            this.j.c();
            this.j = null;
          }
          this.b = null;
        }
        return;
        a();
        this.j.a((ShortBuffer)this.e, this.h);
        continue;
        if ((this.f == 5121) || (this.f == 5120))
        {
          this.e = parame.J().a();
          if (this.j == null)
          {
            a((ByteBuffer)this.e, i);
          }
          else
          {
            a();
            this.j.a((ByteBuffer)this.e, this.h);
          }
        }
        else
        {
          this.e = parame.J().c();
          if (this.j == null)
          {
            ((IntBuffer)this.e).put(this.b, 0, i);
          }
          else
          {
            a();
            this.j.a((IntBuffer)this.e);
          }
        }
      }
    }
    super.e(parame);
  }

  public static final class a extends i
  {
    public a(int[] paramArrayOfInt)
    {
      super(true);
      this.b = paramArrayOfInt;
      this.c = 4;
      this.d = this.c;
      this.i = 8;
    }

    public final void a(float paramFloat1, float paramFloat2)
    {
      throw new UnsupportedOperationException("Immutable");
    }

    public final void a(int paramInt1, int paramInt2)
    {
      throw new UnsupportedOperationException("Immutable");
    }

    public final void a(e parame)
    {
      throw new UnsupportedOperationException("Immutable");
    }

    public final void a(int[] paramArrayOfInt, int paramInt1, int paramInt2)
    {
      throw new UnsupportedOperationException("Immutable");
    }
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.google.android.m4b.maps.bp.i
 * JD-Core Version:    0.6.2
 */