import jaclib.memory.Buffer;
import jaggl.OpenGL;

public abstract class Class145 {

   int anInt1682;
   boolean aBool1683 = false;
   static final int anInt1684 = 34962;
   static final int anInt1685 = 34963;
   int anInt1686;
   int anInt1687;
   boolean aBool1688;
   Class545_Sub1 aClass545_Sub1_1689;
   static int[] anIntArray1690 = new int[1];


   Class145(Class545_Sub1 var1, int var2, byte[] var3, int var4, boolean var5) {
      this.aClass545_Sub1_1689 = var1;
      this.anInt1682 = var2;
      this.anInt1687 = var4;
      this.aBool1688 = var5;
      OpenGL.glGenBuffersARB(1, anIntArray1690, 0);
      this.anInt1686 = anIntArray1690[0];
      this.method2684();
      OpenGL.glBufferDataARBub(var2, this.anInt1687, var3, 0, this.aBool1688?'\u88e0':'\u88e4');
      this.aClass545_Sub1_1689.anInt9165 += this.anInt1687;
   }

   Class145(Class545_Sub1 var1, int var2, Buffer var3, int var4, boolean var5) {
      this.aClass545_Sub1_1689 = var1;
      this.anInt1682 = var2;
      this.anInt1687 = var4;
      this.aBool1688 = var5;
      OpenGL.glGenBuffersARB(1, anIntArray1690, 0);
      this.anInt1686 = anIntArray1690[0];
      this.method2684();
      OpenGL.glBufferDataARBa(var2, this.anInt1687, var3.method75(), this.aBool1688?'\u88e0':'\u88e4');
      this.aClass545_Sub1_1689.anInt9165 += this.anInt1687;
   }

   public void finalize() throws Throwable {
      if(!this.aBool1683) {
         this.aClass545_Sub1_1689.method14604(this.anInt1686, this.anInt1687);
         this.aBool1683 = true;
      }

      super.finalize();
   }

   abstract void method2684();

   void method2685(byte[] var1, int var2) {
      this.method2684();
      if(var2 > this.anInt1687) {
         OpenGL.glBufferDataARBub(this.anInt1682, var2, var1, 0, this.aBool1688?'\u88e0':'\u88e4');
         this.aClass545_Sub1_1689.anInt9165 += var2 - this.anInt1687;
         this.anInt1687 = var2;
      } else {
         OpenGL.glBufferSubDataARBub(this.anInt1682, 0, var2, var1, 0);
      }

   }

   void method2686() throws Throwable {
      if(!this.aBool1683) {
         this.aClass545_Sub1_1689.method14604(this.anInt1686, this.anInt1687);
         this.aBool1683 = true;
      }

      super.finalize();
   }

   void method2687() throws Throwable {
      if(!this.aBool1683) {
         this.aClass545_Sub1_1689.method14604(this.anInt1686, this.anInt1687);
         this.aBool1683 = true;
      }

      super.finalize();
   }

   void method2688() throws Throwable {
      if(!this.aBool1683) {
         this.aClass545_Sub1_1689.method14604(this.anInt1686, this.anInt1687);
         this.aBool1683 = true;
      }

      super.finalize();
   }

   abstract void method2689();
}
