Java examples for javax.media.opengl:Shader
compile opengl Shader
import javax.media.opengl.GL2; import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.nio.charset.Charset; public class Main{ public static int compileShader(GL2 gl, int type, String source) { int shader = gl.glCreateShader(type); gl.glShaderSource(shader, 1, new String[] { source }, (int[]) null, 0);//from w ww . ja v a2 s. co m gl.glCompileShader(shader); return shader; } }