diff --git a/MshViewer/Source/OpenGlController.cpp b/MshViewer/Source/OpenGlController.cpp index 9f70075..17fec58 100644 --- a/MshViewer/Source/OpenGlController.cpp +++ b/MshViewer/Source/OpenGlController.cpp @@ -6,6 +6,7 @@ #include #include +#include #define VERTEX_SHADER "Shader/TextureShader.vert" #define FRAGMENT_SHADER "Shader/TextureShader.frag" @@ -388,11 +389,13 @@ void OpenGLController::loadMsh(const char * path) { for (auto& mshIt : segIt->meshIndices) // for every polygon { + std::cout << "== Poly ==" << std::endl; if (mshIt->size() >= 3) // multipoly { // for every triangle of the multi polygon for (unsigned int tri = 0; tri < mshIt->size() - 2; tri++) { + std::cout << "== Triangle ==" << std::endl; // for every edge of the triangle for (int triEdge = 0; triEdge < 3; triEdge++) { @@ -400,7 +403,7 @@ void OpenGLController::loadMsh(const char * path) // every edge has 3 coordinates for (int j = 0; j < 3; j++) tempVertex.position[j] = (GLfloat)segIt->vertex[(*mshIt)[triEdge > 0 ? tri + triEdge : 0] * 3 + j]; - + std::cout << (triEdge > 0 ? tri + triEdge : 0) << std::endl; // and 2 UV if (segIt->uv == NULL) { diff --git a/Release/Msh/4-Poly.msh b/Release/Msh/4-Poly.msh new file mode 100644 index 0000000..18119ec Binary files /dev/null and b/Release/Msh/4-Poly.msh differ diff --git a/Release/Msh/5-Poly.msh b/Release/Msh/5-Poly.msh new file mode 100644 index 0000000..d2e83a3 Binary files /dev/null and b/Release/Msh/5-Poly.msh differ diff --git a/Release/Msh/6-poly.msh b/Release/Msh/6-poly.msh new file mode 100644 index 0000000..5a398f6 Binary files /dev/null and b/Release/Msh/6-poly.msh differ