src/org/lwjgl/demo/opengl/raytracing/Demo33Ubo.java
private void createRayTracingProgram() throws IOException {
		int program = glCreateProgram();
		int vshader = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/quad.vs", GL_VERTEX_SHADER, "330");
		int fshader = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/raytracingUbo.fs", GL_FRAGMENT_SHADER);
		int random = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/random.glsl", GL_FRAGMENT_SHADER);
		int randomCommon = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/randomCommon.glsl", GL_FRAGMENT_SHADER, "330");
		glAttachShader(program, vshader);
		glAttachShader(program, fshader);
		glAttachShader(program, random);
		glAttachShader(program, randomCommon);
		glBindAttribLocation(program, 0, "vertex");
		glBindFragDataLocation(program, 0, "color");
		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.rayTracingProgram = program;
	}
/**
	 * Create the ray tracing shader program.
	 *
	 * @return that program id
	 *
	 * @throws IOException
	 */
Create the ray tracing shader program.
@return that program id


Create the ray tracing shader program . @return that program id
private void createRayTracingProgram() throws IOException {
		int program = glCreateProgram();
		int vshader = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/quad.vs", GL_VERTEX_SHADER, "330");
		int fshader = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/raytracingUbo.fs", GL_FRAGMENT_SHADER);
		int random = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/random.glsl", GL_FRAGMENT_SHADER);
		int randomCommon = DemoUtils.createShader("org/lwjgl/demo/opengl/raytracing/randomCommon.glsl", GL_FRAGMENT_SHADER, "330");
		glAttachShader(program, vshader);
		glAttachShader(program, fshader);
		glAttachShader(program, random);
		glAttachShader(program, randomCommon);
		glBindAttribLocation(program, 0, "vertex");
		glBindFragDataLocation(program, 0, "color");
		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.rayTracingProgram = program;
	}
private void createRayTracingProgram ( ) throws IOException { int program = glCreateProgram ( ) ; int vshader = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/quad.vs" , GL_VERTEX_SHADER , "330" ) ; int fshader = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/raytracingUbo.fs" , GL_FRAGMENT_SHADER ) ; int random = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/random.glsl" , GL_FRAGMENT_SHADER ) ; int randomCommon = DemoUtils . createShader ( "org/lwjgl/demo/opengl/raytracing/randomCommon.glsl" , GL_FRAGMENT_SHADER , "330" ) ; glAttachShader ( program , vshader ) ; glAttachShader ( program , fshader ) ; glAttachShader ( program , random ) ; glAttachShader ( program , randomCommon ) ; glBindAttribLocation ( program , 0 , "vertex" ) ; glBindFragDataLocation ( program , 0 , "color" ) ; 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 . rayTracingProgram = program ; }
Create the ray tracing shader program.
Create the ray tracing shader program .