Esempio n. 1
0
void onDisplay() {
	if(showPreformance)
		fps++;
	/* Clear the background as white */
	glClearColor(1.0, 1.0, 1.0, 1.0);
	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
	
	glutSolidCube(1.0);
	glUseProgram(cube.getProgram());
		cube.render();
	glUseProgram(cube2.getProgram());
		cube2.render();
		glTranslatef(0.4f,0.4f,0.4f);
		cube2.render();

	for (int i = 0; i < BALLS; i++) {
		glUseProgram(balls[i].getProgram());
			balls[i].render();
	}
	for (int i = 0; i < DETAIL_GRID*3; i++) {
		glUseProgram(grid[i].getProgram());
			grid[i].render();
	}

	glUseProgram(0);
	PreformanceIRL(1);
	/* Display the result */ 
	glutSwapBuffers();
}
Esempio n. 2
0
void onDisplay() {
	if(showPreformance)
		fps++;
	/* Clear the background as white */
	glClearColor(1.0, 1.0, 1.0, 1.0);
	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
	
	glUseProgram(cube.getProgram());
			cube.render();
	glUseProgram(cube2.getProgram());
			cube2.render();

	glUseProgram(0);
	PreformanceIRL(1);
	/* Display the result */ 
	glutSwapBuffers();
}