SWBF2-Classic-Msh-Viewer/MshViewer/main.cpp

40 lines
656 B
C++
Raw Normal View History

#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>
int main(int argc, char** argv)
{
goto openGL;
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;
openGL:
2016-09-08 09:36:57 +00:00
OpenGLController *scene = OpenGLController::getInstance();
scene->loadMsh("..\\Release\\Msh\\cubeTrans.msh");
do {
2016-09-08 09:36:57 +00:00
scene->updateScene();
} while (!glfwWindowShouldClose(scene->getWindow()));
delete scene;
return 0;
}