Ejemplo n.º 1
0
// Initialize GLUT and start main loop
int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitWindowSize(window_width, window_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("GLUT Example!!!");
glutIdleFunc(main_loop_function);
GL_Setup(window_width, window_height);
glutMainLoop();
}
Ejemplo n.º 2
0
int main(int argc, char** argv) {
	glutInit(&argc, argv);
	glutInitWindowSize(windowWidth, windowHeight);
	glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
	glutCreateWindow("Hello World");
	glutIdleFunc(mainLoop);
	GL_Setup(windowWidth, windowHeight);
	glutMainLoop();
}
Ejemplo n.º 3
0
void Core::init(int width, int height, int counter, char **args)
{
  glutInit(&counter, args);
  glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
  Core::width = width;
  Core::height = height;
  glutInitWindowSize(Core::width, Core::height);
  glutCreateWindow("The boredom of Gelfar");
  glutIdleFunc(idle_func);
  glutMouseFunc(mouse_func);
  glutDisplayFunc(display_func);
  glutPassiveMotionFunc(passive_motion_func);
  glutMotionFunc(passive_motion_func);
  GL_Setup(Core::width, Core::height);
  glutMainLoop();
}
Ejemplo n.º 4
0
int main(int argc, char** argv) {
    initialize();
    glutInit(&argc, argv);
    glutInitWindowSize(window_width, window_height);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    glutCreateWindow("Falling Ball");
    glutDisplayFunc(display);
    glutIdleFunc(idle);
    GL_Setup(window_width, window_height);
    glutKeyboardFunc(processNormalKeys);
	glutSpecialFunc(processSpecialKeys);
    glutSpecialUpFunc(releaseSpecialKey);
    glutMouseFunc(mouseButton);
    glutMotionFunc(mouseMove);
    glutMainLoop();
}