.class public Lcom/badlogic/gdx/graphics/glutils/IndexArray;
.super Ljava/lang/Object;
.source "IndexArray.java"

# interfaces
.implements Lcom/badlogic/gdx/graphics/glutils/IndexData;


# instance fields
.field final a:Ljava/nio/ShortBuffer;

.field final b:Ljava/nio/ByteBuffer;

.field private final c:Z


# direct methods
.method public constructor <init>(I)V
    .locals 2

    .line 34
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x1

    if-nez p1, :cond_0

    const/4 v1, 0x1

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    .line 36
    :goto_0
    iput-boolean v1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->c:Z

    .line 37
    iget-boolean v1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->c:Z

    if-eqz v1, :cond_1

    const/4 p1, 0x1

    :cond_1
    mul-int/lit8 p1, p1, 0x2

    .line 41
    invoke-static {p1}, Lcom/badlogic/gdx/utils/BufferUtils;->d(I)Ljava/nio/ByteBuffer;

    move-result-object p1

    iput-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->b:Ljava/nio/ByteBuffer;

    .line 42
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->asShortBuffer()Ljava/nio/ShortBuffer;

    move-result-object p1

    iput-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    .line 43
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    invoke-virtual {p1}, Ljava/nio/ShortBuffer;->flip()Ljava/nio/Buffer;

    .line 44
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;

    return-void
.end method


# virtual methods
.method public a()I
    .locals 1

    .line 49
    iget-boolean v0, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->c:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    invoke-virtual {v0}, Ljava/nio/ShortBuffer;->limit()I

    move-result v0

    :goto_0
    return v0
.end method

.method public a([SII)V
    .locals 1

    .line 70
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    invoke-virtual {v0}, Ljava/nio/ShortBuffer;->clear()Ljava/nio/Buffer;

    .line 71
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    invoke-virtual {v0, p1, p2, p3}, Ljava/nio/ShortBuffer;->put([SII)Ljava/nio/ShortBuffer;

    .line 72
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    invoke-virtual {p1}, Ljava/nio/ShortBuffer;->flip()Ljava/nio/Buffer;

    .line 73
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->b:Ljava/nio/ByteBuffer;

    const/4 p2, 0x0

    invoke-virtual {p1, p2}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 74
    iget-object p1, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->b:Ljava/nio/ByteBuffer;

    shl-int/lit8 p2, p3, 0x1

    invoke-virtual {p1, p2}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    return-void
.end method

.method public b()Ljava/nio/ShortBuffer;
    .locals 1

    .line 103
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->a:Ljava/nio/ShortBuffer;

    return-object v0
.end method

.method public c()V
    .locals 1

    .line 120
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/glutils/IndexArray;->b:Ljava/nio/ByteBuffer;

    invoke-static {v0}, Lcom/badlogic/gdx/utils/BufferUtils;->a(Ljava/nio/ByteBuffer;)V

    return-void
.end method

.method public d()V
    .locals 0

    return-void
.end method

.method public e()V
    .locals 0

    return-void
.end method

.method public f()V
    .locals 0

    return-void
.end method
