Commit 1affdd27 authored by Christopher Tenter's avatar Christopher Tenter
Browse files

increase max supported face size closes #2522

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21058 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d16801c7
......@@ -389,7 +389,7 @@ void MeshCompiler::weldVertices()
// clear weld map
vertexWeldMapFace_.resize(numIndices_, -1);
vertexWeldMapCorner_.resize(numIndices_, 0xff);
vertexWeldMapCorner_.resize(numIndices_, -1);
// alloc buffer to query vertex data
int maxAdjCount = 0;
......@@ -1505,7 +1505,7 @@ void MeshCompiler::build(bool _weldVertices, bool _optimizeVCache, bool _needPer
std::vector< int > emptyVec;
vertexWeldMapFace_.swap(emptyVec);
} {
std::vector< unsigned char > emptyVec;
std::vector< int > emptyVec;
vertexWeldMapCorner_.swap(emptyVec);
}
}
......@@ -2727,7 +2727,7 @@ void MeshCompiler::createVertexMap(bool _keepIsolatedVerts)
numIsolatedVerts_ = 0; // delete isolated vertices
vertexMapFace_.resize(numDrawVerts_, -1);
vertexMapCorner_.resize(numDrawVerts_, 0xff);
vertexMapCorner_.resize(numDrawVerts_, -1);
for (int i = 0; i < numFaces_; ++i)
{
......@@ -2736,7 +2736,7 @@ void MeshCompiler::createVertexMap(bool _keepIsolatedVerts)
// map from (face, corner) -> vertex id is given by getInputIndexSplit(), so create the inverse
int vertexID = getInputIndexSplit(i, k);
vertexMapFace_[vertexID] = i;
vertexMapCorner_[vertexID] = (unsigned char)k;
vertexMapCorner_[vertexID] = k;
}
}
......@@ -2757,7 +2757,7 @@ void MeshCompiler::createVertexMap(bool _keepIsolatedVerts)
if (i < offsetIso)
{
if (vertexMapFace_[i] < 0 ||
vertexMapCorner_[i] == 0xff)
vertexMapCorner_[i] < 0)
std::cerr << "mesh-assembler: vertexMap error at index: " << i << std::endl;
}
else if (vertexMapFace_[i] < 0)
......
......@@ -794,7 +794,7 @@ private:
numIndices_;
std::vector<int> faceStart_; // start position in buf for each face
std::vector<unsigned char> faceSize_; // face size, copy of faceInput_->getFaceSize() for better performance
std::vector<int> faceSize_; // face size, copy of faceInput_->getFaceSize() for better performance
std::vector<int> faceData_;
size_t maxFaceSize_; // max(faceSize_)
bool constantFaceSize_;
......@@ -805,7 +805,7 @@ private:
bool deleteFaceInputeData_; // delete if face input data internally created
std::vector<int> faceBufSplit_; // mapping from (faceID, cornerID) to interleaved vertex id after splitting
std::vector<unsigned char> faceRotCount_; // # ccw rotations per face, handled internally by getInputIndexOffset
std::vector<int> faceRotCount_; // # ccw rotations per face, handled internally by getInputIndexOffset
std::vector<int> faceSortMap_; // face IDs sorted by group; maps sortFaceID -> FaceID
int provokingVertex_; // provoking vertex of each triangle
bool provokingVertexSetByUser_; // was the provoking vertex selected by user or set to default?
......@@ -861,10 +861,10 @@ private:
struct WeldListEntry
{
int faceId;
unsigned char cornerId;
int cornerId;
int refFaceId;
unsigned char refCornerId;
int refCornerId;
};
struct ACGDLLEXPORT WeldList
......@@ -885,8 +885,8 @@ private:
// mapping from <faceId, faceCornerId> -> <weldFaceId, weldFaceCorner>
// std::vector< std::pair<int, unsigned char> > vertexWeldMap_; // std::pair<int, unsigned char> gets padded to 8 bytes
std::vector< int > vertexWeldMapFace_;
std::vector< unsigned char > vertexWeldMapCorner_;
std::vector<int> vertexWeldMapFace_;
std::vector<int> vertexWeldMapCorner_;
struct ACGDLLEXPORT VertexSplitter
......@@ -950,8 +950,8 @@ private:
/// vertex index in vbo -> input (face id, corner id) pair , also inverse of faceBufSplit_
// std::vector<std::pair<int, unsigned char> > vertexMap_; // sizeof( std::pair<int, unsigned char> ) = 8!!
std::vector< int > vertexMapFace_;
std::vector< unsigned char > vertexMapCorner_;
std::vector<int> vertexMapFace_;
std::vector<int> vertexMapCorner_;
/// input face index -> output tri index
std::vector<int> faceToTriMap_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment