import jaggl.OpenGL;

public class Class137 {

   Class545_Sub1 aClass545_Sub1_1604;
   static int[] anIntArray1605 = new int[2];
   int anInt1606;


   static Class137 method2619(Class545_Sub1 var0, Class130[] var1) {
      int var2;
      for(var2 = 0; var2 < var1.length; ++var2) {
         if(var1[var2] == null || var1[var2].anInt1565 <= 0) {
            return null;
         }
      }

      var2 = OpenGL.glCreateProgram();

      int var3;
      for(var3 = 0; var3 < var1.length; ++var3) {
         OpenGL.glAttachShader(var2, var1[var3].anInt1565);
      }

      OpenGL.glLinkProgram(var2);
      OpenGL.glGetProgramiv(var2, '\u8b82', anIntArray1605, 0);
      if(anIntArray1605[0] == 0) {
         OpenGL.glGetProgramiv(var2, '\u8b84', anIntArray1605, 1);
         if(anIntArray1605[1] > 1) {
            byte[] var4 = new byte[anIntArray1605[1]];
            OpenGL.glGetProgramInfoLog(var2, anIntArray1605[1], anIntArray1605, 0, var4, 0);
            System.out.println(new String(var4));
         }

         if(anIntArray1605[0] == 0) {
            for(var3 = 0; var3 < var1.length; ++var3) {
               OpenGL.glDetachShader(var2, var1[var3].anInt1565);
            }

            OpenGL.glDeleteProgram(var2);
            return null;
         }
      }

      return new Class137(var0, var2, var1);
   }

   Class137(Class545_Sub1 var1, int var2, Class130[] var3) {
      this.aClass545_Sub1_1604 = var1;
      this.anInt1606 = var2;
   }

   void method2620() throws Throwable {
      this.aClass545_Sub1_1604.method14607((long)this.anInt1606);
      super.finalize();
   }

   void method2621() throws Throwable {
      this.aClass545_Sub1_1604.method14607((long)this.anInt1606);
      super.finalize();
   }

   void method2622() throws Throwable {
      this.aClass545_Sub1_1604.method14607((long)this.anInt1606);
      super.finalize();
   }

   public void finalize() throws Throwable {
      this.aClass545_Sub1_1604.method14607((long)this.anInt1606);
      super.finalize();
   }
}
