Ejemplo n.º 1
0
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
	GLWindow glWindow(hInstance);

	glWindow.create(800,600,32, false, true);
	Game game;
	Graphics graphics(&game);
	Input input(&game);
	glWindow.setInput(&input);
	graphics.init();

	while(glWindow.running())
	{
		glWindow.processEvents();
		float dt = glWindow.getElapsedTime();
		game.update(dt);

		graphics.prepare(dt);
		graphics.render();
		glWindow.swapBuffers();

		if(game.isGameOver())
		{
			MessageBox(NULL, "GAME OVER", "GAME OVER", MB_OK);
			break;
		}

	}
	graphics.shutdown();
	return 0;
}
Ejemplo n.º 2
0
int main(int argc, char** argv) { 
	std::cout << "Fireworks Simulator : Under Construction!" << std::endl;
		
	QApplication qtApp(argc, argv);
		
	Math::Point2Df pos(0.0f, 0.0f);
	Math::Color col(100.0f, 100.0f, 100.0f);
	Objects::Particle temp(pos, col);
	
	Window glWindow(400, 400, "glFireworks");
	glWindow.show();	
	
	return 	qtApp.exec();
}