fixed messed up textures of the cluster
This commit is contained in:
parent
9abd285239
commit
60cc7bb562
|
@ -131,6 +131,8 @@ void Object::analyseMsh2Chunks(std::list<ChunkHeader*>& chunkList)
|
|||
std::list<ChunkHeader*> tempMatdChunks;
|
||||
loadChunks(tempMatdChunks, (*it)->position, (*it)->size);
|
||||
|
||||
vTextures.push_back("");
|
||||
|
||||
// analyse MATD subchunks
|
||||
analyseMatdChunks(tempMatdChunks);
|
||||
|
||||
|
@ -193,7 +195,7 @@ void Object::analyseMatdChunks(std::list<ChunkHeader*>& chunkList)
|
|||
char* buffer = new char[(*it)->size + 1];
|
||||
*buffer = { 0 };
|
||||
fsMesh.read(buffer, (*it)->size);
|
||||
vTextures.push_back(buffer);
|
||||
vTextures.back() = buffer;
|
||||
delete buffer;
|
||||
continue;
|
||||
}
|
||||
|
@ -389,6 +391,8 @@ void Object::analyseSegmChunks(Modl * dataDestination, std::list<ChunkHeader*>&
|
|||
/*if (!strcmp("NRML", (*it)->name))
|
||||
{
|
||||
fsMesh.seekg((*it)->position);
|
||||
std::uint32_t tempSize;
|
||||
fsMesh.read(reinterpret_cast<char*>(&tempSize), sizeof(tempSize));
|
||||
// List of normals
|
||||
// long int - 4 - number of normal vectores stored in this list
|
||||
// float[3][] - 12 each - UVW vector for each vertex
|
||||
|
|
|
@ -17,7 +17,7 @@ int main(int argc, char** argv)
|
|||
else
|
||||
scene = OpenGLController::getInstance();
|
||||
|
||||
scene->loadMsh("..\\Release\\Msh\\cluster.msh");
|
||||
scene->loadMsh("..\\Release\\Msh\\quadPoly.msh");
|
||||
|
||||
do {
|
||||
scene->updateScene();
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
Loading…
Reference in New Issue