package main;
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) deadcode ansi safe 
// Source File Name:   SourceFile

import java.io.PrintStream;
import java.nio.*;
import org.lwjgl.opengl.*;

public class ho
{

    private ho(int i1)
    {
        h = 0;
        l = false;
        m = false;
        n = false;
        o = 0;
        p = 0;
        q = false;
        w = false;
        x = false;
        z = 0;
        A = 10;
        B = i1;
        d = df.b(i1 * 4);
        e = d.asIntBuffer();
        f = d.asFloatBuffer();
        g = new int[i1];
        x = c && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
        if(x)
        {
            y = df.c(A);
            ARBVertexBufferObject.glGenBuffersARB(y);
        }
    }

    public void a()
    {
        if(!w)
            throw new IllegalStateException("Not tesselating!");
        w = false;
        if(h > 0)
        {
            e.clear();
            e.put(g, 0, o);
            d.position(0);
            d.limit(o * 4);
            if(x)
            {
                z = (z + 1) % A;
                ARBVertexBufferObject.glBindBufferARB(34962, y.get(z));
                ARBVertexBufferObject.glBufferDataARB(34962, d, 35040);
            }
            if(m)
            {
                if(x)
                {
                    GL11.glTexCoordPointer(2, 5126, 32, 12L);
                } else
                {
                    f.position(3);
                    GL11.glTexCoordPointer(2, 32, f);
                }
                GL11.glEnableClientState(32888);
            }
            if(l)
            {
                if(x)
                {
                    GL11.glColorPointer(4, 5121, 32, 20L);
                } else
                {
                    d.position(20);
                    GL11.glColorPointer(4, true, 32, d);
                }
                GL11.glEnableClientState(32886);
            }
            if(n)
            {
                if(x)
                {
                    GL11.glNormalPointer(5120, 32, 24L);
                } else
                {
                    d.position(24);
                    GL11.glNormalPointer(32, d);
                }
                GL11.glEnableClientState(32885);
            }
            if(x)
            {
                GL11.glVertexPointer(3, 5126, 32, 0L);
            } else
            {
                f.position(0);
                GL11.glVertexPointer(3, 32, f);
            }
            GL11.glEnableClientState(32884);
            if(r == 7 && b)
                GL11.glDrawArrays(4, 0, h);
            else
                GL11.glDrawArrays(r, 0, h);
            GL11.glDisableClientState(32884);
            if(m)
                GL11.glDisableClientState(32888);
            if(l)
                GL11.glDisableClientState(32886);
            if(n)
                GL11.glDisableClientState(32885);
        }
        d();
    }

}
