src/org/lwjgl/demo/opengl/raytracing/Demo.java
private void createComputeProgram() throws IOException {
		int program = glCreateProgram();
		int cshader = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/raytracing.glslcs", GL_COMPUTE_SHADER);
		int random = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/random.glsl", GL_COMPUTE_SHADER);
		int randomCommon = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/randomCommon.glsl", GL_COMPUTE_SHADER, "330");
		glAttachShader(program, cshader);
		glAttachShader(program, random);
		glAttachShader(program, randomCommon);
		glLinkProgram(program);
		int linked = glGetProgrami(program, GL_LINK_STATUS);
		String programLog = glGetProgramInfoLog(program);
		if (programLog != null && programLog.trim().length() > 0) {
			System.err.println(programLog);
		}
		if (linked == 0) {
			throw new AssertionError("Could not link program");
		}
		this.computeProgram = program;
	}
/**
	 * Create the tracing compute shader program.
	 *
	 * @throws IOException
	 */
Create the tracing compute shader program.
Create the tracing compute shader program .
private void createComputeProgram() throws IOException {
		int program = glCreateProgram();
		int cshader = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/raytracing.glslcs", GL_COMPUTE_SHADER);
		int random = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/random.glsl", GL_COMPUTE_SHADER);
		int randomCommon = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/randomCommon.glsl", GL_COMPUTE_SHADER, "330");
		glAttachShader(program, cshader);
		glAttachShader(program, random);
		glAttachShader(program, randomCommon);
		glLinkProgram(program);
		int linked = glGetProgrami(program, GL_LINK_STATUS);
		String programLog = glGetProgramInfoLog(program);
		if (programLog != null && programLog.trim().length() > 0) {
			System.err.println(programLog);
		}
		if (linked == 0) {
			throw new AssertionError("Could not link program");
		}
		this.computeProgram = program;
	}
private void createComputeProgram ( ) throws IOException { int program = glCreateProgram ( ) ; int cshader = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/raytracing.glslcs" , GL_COMPUTE_SHADER ) ; int random = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/random.glsl" , GL_COMPUTE_SHADER ) ; int randomCommon = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/randomCommon.glsl" , GL_COMPUTE_SHADER , "330" ) ; glAttachShader ( program , cshader ) ; glAttachShader ( program , random ) ; glAttachShader ( program , randomCommon ) ; glLinkProgram ( program ) ; int linked = glGetProgrami ( program , GL_LINK_STATUS ) ; String programLog = glGetProgramInfoLog ( program ) ; if ( programLog != null && programLog . trim ( ) . length ( ) > 0 ) { System . err . println ( programLog ) ; } if ( linked == 0 ) { throw new AssertionError ( "Could not link program" ) ; } this . computeProgram = program ; }
Create the tracing compute shader program.
Create the tracing compute shader program .