Пример #1
0
/*
 *  Ubiquitous main function, argv and all
 *
 */
int main(int argc, char* argv[])
{
	int bez[] = { 
		GLUT_KEY_F1,
		GLUT_KEY_F2,
		GLUT_KEY_F3,
		GLUT_KEY_F4,
		GLUT_KEY_F5,
		GLUT_KEY_F6,
		GLUT_KEY_F7,
		GLUT_KEY_F8,
		GLUT_KEY_F9,
		0,
	};

	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_RGBA|GLUT_DEPTH|GLUT_DOUBLE);

	glutCreateWindow("University of Missouri Campus");

	glutDisplayFunc(display);
	glutReshapeFunc(reshape);
	glutMouseFunc(mouse_click);
	glutMotionFunc(mouse_drag);

	// real-time muliple key-presses
	initKeyboard(50);
	keyboardCallbackv("asdfhjklionm", move_camera);
	keyboardCallback(27, closeWin);
	keyboardSpecialCallback(GLUT_KEY_F12, fillMode);
	keyboardSpecialCallback(GLUT_KEY_F11, free_camera);
	keyboardSpecialCallback(GLUT_KEY_F10, circle_camera);
	keyboardSpecialCallbackv(bez, bezier_camera);

	init_lights();
	init_campus();
	init_camera();

	glutFullScreen();
	glutMainLoop();
	return 0;
}
Пример #2
0
GLvoid keyboardSpecialCallbackUp(int key, int x, int y) {
	keyboardSpecialCallback(key, x, y, JNI_TRUE);
}
Пример #3
0
GLvoid keyboardSpecialCallbackDown(int key, int x, int y) {
	keyboardSpecialCallback(key, x, y, JNI_FALSE);
}