main.cpp 817 Bytes
Newer Older
1
2
3
4
5
#ifndef _DEBUG
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
#endif // DEBUG

#include "OpenGLController.h"
Anakin's avatar
Anakin committed
6
7
8
#include "Object.h"
#include <iostream>
#include <Windows.h>
9
10
11

int main(int argc, char** argv)
{
12
13
14
15
16
17
18
19
20
21
22
23
	OpenGLController* scene = NULL;

	if (argc == 3)
	{
		int major = atoi(argv[1]);
		int minor = atoi(argv[2]);
		scene = OpenGLController::getInstance(major, minor);
	}
	else
		scene = OpenGLController::getInstance();


Anakin's avatar
Anakin committed
24
	goto openGL;
Anakin's avatar
Anakin committed
25

Anakin's avatar
Anakin committed
26
	try {
Anakin's avatar
Anakin committed
27
		Object obj("..\\Release\\Msh\\cubeTex.msh");
Anakin's avatar
Anakin committed
28
29
30
31
32
33
34
35
36
37
	}
	catch (std::invalid_argument e)
	{
		std::cout << e.what() << std::endl;
	}
	
	system("pause");


	return 0;
Anakin's avatar
Anakin committed
38
39
40

openGL:

Anakin's avatar
Anakin committed
41
	scene->loadMsh("..\\Release\\Msh\\houseWOnull.msh");
42

Anakin's avatar
Anakin committed
43
	do {
Anakin's avatar
Anakin committed
44
45
46
47
		scene->updateScene();
	} while (!glfwWindowShouldClose(scene->getWindow()));

	delete scene;
48
49
50

	return 0;
}