Created
November 6, 2015 13:55
-
-
Save jamieshepherd/7dfbbd47396f10262e19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Index or face | |
else if (streamChar == 'f') { | |
UINT value = 0; | |
m_TriangleCount = 0; | |
if (!fileStream) { | |
MessageBox(NULL, L"BROKE1", L"Critical error", MB_ICONWARNING | MB_OK); | |
} | |
// As long as we're on the same line | |
while (streamChar != '\n') { | |
if (!fileStream) { | |
MessageBox(NULL, L"BROKE2", L"Critical error", MB_ICONWARNING | MB_OK); | |
} | |
//fileStream.get(streamChar); | |
// TAKE THE FIRST CHAR, THIS IS AN INDEX | |
fileStream >> std::skipws >> value; | |
fileStream.get(streamChar); | |
if (!fileStream) { | |
MessageBox(NULL, L"BROKE3", L"Critical error", MB_ICONWARNING | MB_OK); | |
} | |
while (streamChar != ' ') { | |
if (!fileStream) { | |
MessageBox(NULL, L"BROKE4", L"Critical error", MB_ICONWARNING | MB_OK); | |
} | |
fileStream.get(streamChar); | |
if (!fileStream) { | |
MessageBox(NULL, L"BROKE5", L"Critical error", MB_ICONWARNING | MB_OK); | |
} | |
if (streamChar == '\n') { | |
break; | |
} | |
} | |
m_Indices.push_back((UINT)value - 1); | |
} | |
m_TriangleCount++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment