import jaggl.OpenGL;
import java.awt.Canvas;
import java.awt.Dimension;

public class Class151_Sub2_Sub1 extends Class151_Sub2 {

   boolean aBool10146;
   int anInt10147;
   Canvas aCanvas10148;
   long aLong10149;
   Class545_Sub1 aClass545_Sub1_10150;
   int anInt10151;
   OpenGL anOpenGL10152;


   public int method14949(int var1, int var2) {
      return 0;
   }

   void method14946(int var1, int var2) {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.surfaceResized(this.aLong10149);
         this.method15766();
         if(this == this.aClass545_Sub1_10150.method11482((byte)14)) {
            this.aClass545_Sub1_10150.method14623();
         }

      }
   }

   public int method2745() {
      return this.anInt10151;
   }

   boolean method149() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.setSurface(this.aLong10149);
         this.aClass545_Sub1_10150.method14546();
         return true;
      }
   }

   void method14947(int var1, int var2) {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.surfaceResized(this.aLong10149);
         this.method15766();
         if(this == this.aClass545_Sub1_10150.method11482((byte)14)) {
            this.aClass545_Sub1_10150.method14623();
         }

      }
   }

   void method15766() {
      Dimension var1 = this.aCanvas10148.getSize();
      this.anInt10151 = var1.height;
      this.anInt10147 = var1.width;
   }

   public int method14944() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.swapBuffers(this.aLong10149);
         return 0;
      }
   }

   public int method14945(int var1, int var2) {
      return 0;
   }

   boolean method154() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.setSurface(this.aLong10149);
         this.aClass545_Sub1_10150.method14546();
         return true;
      }
   }

   boolean method2748() {
      return true;
   }

   public void method10() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.releaseSurface(this.aCanvas10148, this.aLong10149);
         this.aBool10146 = true;
      }
   }

   public int method2747() {
      return this.anInt10147;
   }

   Class151_Sub2_Sub1(Class545_Sub1 var1, Canvas var2) {
      this(var1, var2, var1.anOpenGL9224.prepareSurface(var2));
   }

   boolean method2743() {
      return true;
   }

   public int method2744() {
      return this.anInt10147;
   }

   Class151_Sub2_Sub1(Class545_Sub1 var1, Canvas var2, long var3) {
      this.aBool10146 = false;
      this.aClass545_Sub1_10150 = var1;
      this.aCanvas10148 = var2;
      this.anOpenGL10152 = var1.anOpenGL9224;
      this.aLong10149 = var3;
      this.method15766();
   }

   public int method2746() {
      return this.anInt10151;
   }

   public int method2742() {
      return this.anInt10151;
   }

   public int method14948() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.swapBuffers(this.aLong10149);
         return 0;
      }
   }

   public int method2741() {
      return this.anInt10147;
   }

   public void method148() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.releaseSurface(this.aCanvas10148, this.aLong10149);
         this.aBool10146 = true;
      }
   }

   public void method150() {
      if(this.aBool10146) {
         throw new IllegalStateException();
      } else {
         this.anOpenGL10152.releaseSurface(this.aCanvas10148, this.aLong10149);
         this.aBool10146 = true;
      }
   }
}
