Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/linux/flatpak/ogre1.9-gcc5.2.patch @ 151

Last change on this file since 151 was 151, checked in by bucyril, 6 years ago

added almost working flatpak build repo

File size: 2.5 KB
  • OgreMain/include/OgreProgressiveMeshGenerator.h

    a b  
    215215        void tuneContainerSize();
    216216        void addVertexData(VertexData* vertexData, bool useSharedVertexLookup);
    217217        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        }
    219252        void addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID);
    220253
    221254        void computeCosts();
  • OgreMain/src/OgreProgressiveMeshGenerator.cpp

    a b  
    219219        }
    220220        vbuf->unlock();
    221221}
     222/// Called from OgreQueuedProgressiveMeshGenerator.cpp, so it can not be defined in here.
     223#if 0
    222224template<typename IndexType>
    223225void ProgressiveMeshGenerator::addIndexDataImpl(IndexType* iPos, const IndexType* iEnd,
    224226                                                VertexLookupList& lookup,
     
    256258                addTriangleToEdges(tri);
    257259        }
    258260}
     261#endif // 0
    259262
    260263void ProgressiveMeshGenerator::addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID)
    261264{
Note: See TracBrowser for help on using the repository browser.