source:
downloads/linux/flatpak/res/ogre1.9-gcc5.2.patch
Last change on this file was 152, checked in by bucyril, 6 years ago | |
---|---|
File size: 2.5 KB |
-
OgreMain/include/OgreProgressiveMeshGenerator.h
a b 215 215 void tuneContainerSize(); 216 216 void addVertexData(VertexData* vertexData, bool useSharedVertexLookup); 217 217 template<typename IndexType> 218 void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID); 218 void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID) 219 { 220 221 // Loop through all triangles and connect them to the vertices. 222 for (; iPos < iEnd; iPos += 3) { 223 // It should never reallocate or every pointer will be invalid. 224 OgreAssert(mTriangleList.capacity() > mTriangleList.size(), ""); 225 mTriangleList.push_back(PMTriangle()); 226 PMTriangle* tri = &mTriangleList.back(); 227 tri->isRemoved = false; 228 tri->submeshID = submeshID; 229 for (int i = 0; i < 3; i++) { 230 // Invalid index: Index is bigger then vertex buffer size. 231 OgreAssert(iPos[i] < lookup.size(), ""); 232 tri->vertexID[i] = iPos[i]; 233 tri->vertex[i] = lookup[iPos[i]]; 234 } 235 if (tri->isMalformed()) { 236 #if OGRE_DEBUG_MODE 237 stringstream str; 238 str << "In " << mMeshName << " malformed triangle found with ID: " << getTriangleID(tri) << ". " << 239 std::endl; 240 printTriangle(tri, str); 241 str << "It will be excluded from LOD level calculations."; 242 LogManager::getSingleton().stream() << str.str(); 243 #endif 244 tri->isRemoved = true; 245 mIndexBufferInfoList[tri->submeshID].indexCount -= 3; 246 continue; 247 } 248 tri->computeNormal(); 249 addTriangleToEdges(tri); 250 } 251 } 219 252 void addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID); 220 253 221 254 void computeCosts(); -
OgreMain/src/OgreProgressiveMeshGenerator.cpp
a b 219 219 } 220 220 vbuf->unlock(); 221 221 } 222 /// Called from OgreQueuedProgressiveMeshGenerator.cpp, so it can not be defined in here. 223 #if 0 222 224 template<typename IndexType> 223 225 void ProgressiveMeshGenerator::addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, 224 226 VertexLookupList& lookup, … … 256 258 addTriangleToEdges(tri); 257 259 } 258 260 } 261 #endif // 0 259 262 260 263 void ProgressiveMeshGenerator::addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID) 261 264 {
Note: See TracBrowser
for help on using the repository browser.