/* Class157 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jaggl.OpenGL;

public class Class157 {
	Class84_Sub3 aClass84_Sub3_1877;
	static int[] anIntArray1878 = new int[2];
	int anInt1879;

	void method3453() throws Throwable {
		((Class157) this).aClass84_Sub3_1877.method15458((long) ((Class157) this).anInt1879);
		super.finalize();
	}

	void method3454() throws Throwable {
		((Class157) this).aClass84_Sub3_1877.method15458((long) ((Class157) this).anInt1879);
		super.finalize();
	}

	public void finalize() throws Throwable {
		((Class157) this).aClass84_Sub3_1877.method15458((long) ((Class157) this).anInt1879);
		super.finalize();
	}

	static Class157 method3455(Class84_Sub3 class84_sub3, Class142[] class142s) {
		for (int i = 0; i < class142s.length; i++) {
			if (class142s[i] == null || ((Class142) class142s[i]).anInt1756 <= 0)
				return null;
		}
		int i = OpenGL.glCreateProgram();
		for (int i_0_ = 0; i_0_ < class142s.length; i_0_++)
			OpenGL.glAttachShader(i, ((Class142) class142s[i_0_]).anInt1756);
		OpenGL.glLinkProgram(i);
		OpenGL.glGetProgramiv(i, 35714, anIntArray1878, 0);
		if (anIntArray1878[0] == 0) {
			OpenGL.glGetProgramiv(i, 35716, anIntArray1878, 1);
			if (anIntArray1878[1] > 1) {
				byte[] is = new byte[anIntArray1878[1]];
				OpenGL.glGetProgramInfoLog(i, anIntArray1878[1], anIntArray1878, 0, is, 0);
				System.out.println(new String(is));
			}
			if (anIntArray1878[0] == 0) {
				for (int i_1_ = 0; i_1_ < class142s.length; i_1_++)
					OpenGL.glDetachShader(i, (((Class142) class142s[i_1_]).anInt1756));
				OpenGL.glDeleteProgram(i);
				return null;
			}
		}
		return new Class157(class84_sub3, i, class142s);
	}

	static Class157 method3456(Class84_Sub3 class84_sub3, Class142[] class142s) {
		for (int i = 0; i < class142s.length; i++) {
			if (class142s[i] == null || ((Class142) class142s[i]).anInt1756 <= 0)
				return null;
		}
		int i = OpenGL.glCreateProgram();
		for (int i_2_ = 0; i_2_ < class142s.length; i_2_++)
			OpenGL.glAttachShader(i, ((Class142) class142s[i_2_]).anInt1756);
		OpenGL.glLinkProgram(i);
		OpenGL.glGetProgramiv(i, 35714, anIntArray1878, 0);
		if (anIntArray1878[0] == 0) {
			OpenGL.glGetProgramiv(i, 35716, anIntArray1878, 1);
			if (anIntArray1878[1] > 1) {
				byte[] is = new byte[anIntArray1878[1]];
				OpenGL.glGetProgramInfoLog(i, anIntArray1878[1], anIntArray1878, 0, is, 0);
				System.out.println(new String(is));
			}
			if (anIntArray1878[0] == 0) {
				for (int i_3_ = 0; i_3_ < class142s.length; i_3_++)
					OpenGL.glDetachShader(i, (((Class142) class142s[i_3_]).anInt1756));
				OpenGL.glDeleteProgram(i);
				return null;
			}
		}
		return new Class157(class84_sub3, i, class142s);
	}

	Class157(Class84_Sub3 class84_sub3, int i, Class142[] class142s) {
		((Class157) this).aClass84_Sub3_1877 = class84_sub3;
		((Class157) this).anInt1879 = i;
	}

	static Class157 method3457(Class84_Sub3 class84_sub3, Class142[] class142s) {
		for (int i = 0; i < class142s.length; i++) {
			if (class142s[i] == null || ((Class142) class142s[i]).anInt1756 <= 0)
				return null;
		}
		int i = OpenGL.glCreateProgram();
		for (int i_4_ = 0; i_4_ < class142s.length; i_4_++)
			OpenGL.glAttachShader(i, ((Class142) class142s[i_4_]).anInt1756);
		OpenGL.glLinkProgram(i);
		OpenGL.glGetProgramiv(i, 35714, anIntArray1878, 0);
		if (anIntArray1878[0] == 0) {
			OpenGL.glGetProgramiv(i, 35716, anIntArray1878, 1);
			if (anIntArray1878[1] > 1) {
				byte[] is = new byte[anIntArray1878[1]];
				OpenGL.glGetProgramInfoLog(i, anIntArray1878[1], anIntArray1878, 0, is, 0);
				System.out.println(new String(is));
			}
			if (anIntArray1878[0] == 0) {
				for (int i_5_ = 0; i_5_ < class142s.length; i_5_++)
					OpenGL.glDetachShader(i, (((Class142) class142s[i_5_]).anInt1756));
				OpenGL.glDeleteProgram(i);
				return null;
			}
		}
		return new Class157(class84_sub3, i, class142s);
	}
}
