public void setValue(float f0, float f1, float f2, float f3) { if (this.getLocation() >= 0) { if (this.values[0] != f0 || this.values[1] != f1 || this.values[2] != f2 || this.values[3] != f3) { ARBShaderObjects.glUniform4fARB(this.getLocation(), f0, f1, f2, f3); Shaders.checkGLError(this.getName()); this.values[0] = f0; this.values[1] = f1; this.values[2] = f2; this.values[3] = f3; } } }
public static void glAttachShader(int program, int shaderIn) { if (arbShaders) { ARBShaderObjects.glAttachObjectARB(program, shaderIn); } else { GL20.glAttachShader(program, shaderIn); } }
public static void glDeleteShader(int p_153180_0_) { if (arbShaders) { ARBShaderObjects.glDeleteObjectARB(p_153180_0_); } else { GL20.glDeleteShader(p_153180_0_); } }
public static void glCompileShader(int shaderIn) { if (arbShaders) { ARBShaderObjects.glCompileShaderARB(shaderIn); } else { GL20.glCompileShader(shaderIn); } }
public static void glShaderSource(int shaderIn, ByteBuffer string) { if (arbShaders) { ARBShaderObjects.glShaderSourceARB(shaderIn, string); } else { GL20.glShaderSource(shaderIn, string); } }
public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices) { if (arbShaders) { ARBShaderObjects.glUniformMatrix3ARB(location, transpose, matrices); } else { GL20.glUniformMatrix3(location, transpose, matrices); } }
public static void glUniform1(int location, FloatBuffer values) { if (arbShaders) { ARBShaderObjects.glUniform1ARB(location, values); } else { GL20.glUniform1(location, values); } }
public static void glUniform3(int location, FloatBuffer values) { if (arbShaders) { ARBShaderObjects.glUniform3ARB(location, values); } else { GL20.glUniform3(location, values); } }
public static void glUseProgram(int program) { if (arbShaders) { ARBShaderObjects.glUseProgramObjectARB(program); } else { GL20.glUseProgram(program); } }
public static void glLinkProgram(int program) { if (arbShaders) { ARBShaderObjects.glLinkProgramARB(program); } else { GL20.glLinkProgram(program); } }
private static boolean printLogInfo(int obj, String name) { IntBuffer intbuffer = BufferUtils.createIntBuffer(1); ARBShaderObjects.glGetObjectParameterARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, (IntBuffer)intbuffer); int i = intbuffer.get(); if (i > 1) { ByteBuffer bytebuffer = BufferUtils.createByteBuffer(i); intbuffer.flip(); ARBShaderObjects.glGetInfoLogARB(obj, intbuffer, bytebuffer); byte[] abyte = new byte[i]; bytebuffer.get(abyte); if (abyte[i - 1] == 0) { abyte[i - 1] = 10; } String s = new String(abyte); SMCLog.info("Info log: " + name + "\n" + s); return false; } else { return true; } }
public static void glDeleteShader(int shaderIn) { if (arbShaders) { ARBShaderObjects.glDeleteObjectARB(shaderIn); } else { GL20.glDeleteShader(shaderIn); } }
public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer matrices) { if (arbShaders) { ARBShaderObjects.glUniformMatrix4ARB(location, transpose, matrices); } else { GL20.glUniformMatrix4(location, transpose, matrices); } }
public static void setProgramUniform1f(String name, float x) { int i = programsID[activeProgram]; if (i != 0) { int j = ARBShaderObjects.glGetUniformLocationARB(i, (CharSequence)name); ARBShaderObjects.glUniform1fARB(j, x); checkGLError(programNames[activeProgram], name); } }
public static void glUniform3(int location, IntBuffer values) { if (arbShaders) { ARBShaderObjects.glUniform3ARB(location, values); } else { GL20.glUniform3(location, values); } }
public static void glUniform4(int location, IntBuffer values) { if (arbShaders) { ARBShaderObjects.glUniform4ARB(location, values); } else { GL20.glUniform4(location, values); } }
public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer matrices) { if (arbShaders) { ARBShaderObjects.glUniformMatrix2ARB(location, transpose, matrices); } else { GL20.glUniformMatrix2(location, transpose, matrices); } }
public static void glDeleteProgram(int program) { if (arbShaders) { ARBShaderObjects.glDeleteObjectARB(program); } else { GL20.glDeleteProgram(program); } }
public static void setProgramUniform3f(String name, float x, float y, float z) { int i = programsID[activeProgram]; if (i != 0) { int j = ARBShaderObjects.glGetUniformLocationARB(i, (CharSequence)name); ARBShaderObjects.glUniform3fARB(j, x, y, z); checkGLError(programNames[activeProgram], name); } }
public void setProgram(int program) { if (this.program != program) { this.program = program; this.location = ARBShaderObjects.glGetUniformLocationARB(program, (CharSequence)this.name); this.onProgramChanged(); } }
public static void glUniform2(int location, IntBuffer values) { if (arbShaders) { ARBShaderObjects.glUniform2ARB(location, values); } else { GL20.glUniform2(location, values); } }