void Engine::Run()
{
	// Initialise OpenGL Context
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
	glutInitWindowSize(windowWidth, windowHeight);
	glutInitWindowPosition(100, 100);
	windowID = glutCreateWindow(windowTitle);
	current = this;

	// Rendering Functions
	glutDisplayFunc(DrawFunc);
	glutReshapeFunc(ResizeFunc);
	glutIdleFunc(IdleFunc);

	// Peripheral Input Handling
	glutKeyboardFunc(KeyDownFunc);
	glutKeyboardUpFunc(KeyUpFunc);
	glutSpecialFunc(SpecialKeyDownFunc);
	glutSpecialUpFunc(SpecialKeyUpFunc);
	glutMouseFunc(MouseFunc);
	glutMotionFunc(MouseMotionFunc);
	glutPassiveMotionFunc(PassiveMouseMotionFunc);

	InitFunc();

	printf("Setup complete. Window created [%dx%d]\n", windowWidth, windowHeight);
	printf("OpenGL version: %s\n", glGetString(GL_VERSION));

	glutMainLoop();
}
Пример #2
0
BOOL CParmStatDlg::OnInitDialog() 
{
   CParamDlg::OnInitDialog();
   
   SetWindowText("Statistic Functions");
   InitFunc();
   SetFunc();
   ShowType();
   ShowHint();
   EnableFunc();
   EnableType();
   EnableHint();
   EnableValues();
   m_pRun->SetValues(this);
   UpdateData(FALSE);
   return TRUE;
}