SWBF2-Classic-Msh-Viewer/MshViewer/main.cpp
Anakin e509b1e11c display all models from a mesh,
problem, apply different model matrices for each model,
solution give a list of all models to ogl controller, where they are handled,
next steps: find solution for wrong rotation + draw ALL models instead of only the first
2016-10-30 14:22:08 +01:00

40 lines
656 B
C++

#ifndef _DEBUG
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
#endif // DEBUG
#include "OpenGLController.h"
#include "Object.h"
#include <iostream>
#include <Windows.h>
int main(int argc, char** argv)
{
goto openGL;
try {
Object obj("..\\Release\\Msh\\cubeTex.msh");
}
catch (std::invalid_argument e)
{
std::cout << e.what() << std::endl;
}
system("pause");
return 0;
openGL:
OpenGLController *scene = OpenGLController::getInstance();
scene->loadMsh("..\\Release\\Msh\\cubeTrans.msh");
do {
scene->updateScene();
} while (!glfwWindowShouldClose(scene->getWindow()));
delete scene;
return 0;
}