Beispiel #1
0
int main(){

  //problem1();
  //problem2();
  problem8();
  return(0);
}
Beispiel #2
0
int main(int argc, char** argv) {
	// Lab two problems
	problemOne();
	problemTwo();
	problemThree();
	problemFour();
	problemFive();
	problemSix();
	problemSeven();
	problem8();
	problem9();
	problem10();

    // Pass any applicable command line arguments to GLUT. These arguments
	// are platform dependent.
    glutInit(&argc, argv);

	// Set the initial window size
	glutInitWindowSize( 400, 400 );

	// Create a window using a string and make it the current window.
	glutCreateWindow("CSE 618 Lab2");

	// Indicate to GLUT that the flow of control should return to the program after
	// the window is closed and the GLUTmain loop is exited.
	glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);

	// GLEW does not entirely support the Core GLUT Profile out of the box. 
	// The following statement fixes the problem.
	glewExperimental = GL_TRUE;

	// Intilize GLEW. This must be done after glut is initialized.
	GLenum res = glewInit();
	if (res != GLEW_OK) {
		fprintf(stderr, "Error: '%s'\n", glewGetErrorString(res));
		return false; // GLEW could not be initialized.
	}

	// Callback for window redisplay
	glutDisplayFunc(RenderSceneCB);		
	glutReshapeFunc(ResizeCB);

	// Set window clear color
	glClearColor( 0.0f, 0.0f, 0.0f, 1.0f);

	// Unbind shader in use to enable fixed function pipeline functionality (compatability mode)
	glUseProgram(0);
	
	// Enter the GLUT main loop. Control will not return until the
	// window is closed.
    glutMainLoop();

	return 0;

} // end main