2016-09-06 13:15:29 +00:00
|
|
|
#ifndef _DEBUG
|
|
|
|
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
|
|
|
|
#endif // DEBUG
|
|
|
|
|
|
|
|
#include "OpenGLController.h"
|
2016-09-12 14:49:05 +00:00
|
|
|
#include "Object.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include <Windows.h>
|
2016-09-06 13:15:29 +00:00
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2016-11-01 13:16:18 +00:00
|
|
|
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();
|
|
|
|
|
|
|
|
|
2016-10-16 14:50:20 +00:00
|
|
|
goto openGL;
|
2016-10-11 11:41:24 +00:00
|
|
|
|
2016-09-12 14:49:05 +00:00
|
|
|
try {
|
2016-10-23 13:38:47 +00:00
|
|
|
Object obj("..\\Release\\Msh\\cubeTex.msh");
|
2016-09-12 14:49:05 +00:00
|
|
|
}
|
|
|
|
catch (std::invalid_argument e)
|
|
|
|
{
|
|
|
|
std::cout << e.what() << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
system("pause");
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
2016-10-11 11:41:24 +00:00
|
|
|
|
|
|
|
openGL:
|
|
|
|
|
2016-11-07 16:11:02 +00:00
|
|
|
scene->loadMsh("..\\Release\\Msh\\multipleModels.msh");
|
2016-09-08 15:41:26 +00:00
|
|
|
|
2016-09-07 14:07:56 +00:00
|
|
|
do {
|
2016-09-08 09:36:57 +00:00
|
|
|
scene->updateScene();
|
|
|
|
} while (!glfwWindowShouldClose(scene->getWindow()));
|
|
|
|
|
|
|
|
delete scene;
|
2016-09-06 13:15:29 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|