mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Fix build warnings
This commit is contained in:
parent
83229db458
commit
4e0db5d641
4 changed files with 6 additions and 6 deletions
|
@ -28,7 +28,7 @@ AnimSkeleton::AnimSkeleton(const HFMModel& hfmModel) {
|
|||
const auto& defor = hfmModel.skinDeformers[i];
|
||||
std::vector<HFMCluster> dummyClustersList;
|
||||
|
||||
for (int j = 0; j < (uint32_t) defor.clusters.size(); j++) {
|
||||
for (uint32_t j = 0; j < (uint32_t)defor.clusters.size(); j++) {
|
||||
// cast into a non-const reference, so we can mutate the FBXCluster
|
||||
HFMCluster& cluster = const_cast<HFMCluster&>(defor.clusters.at(j));
|
||||
|
||||
|
|
|
@ -1389,7 +1389,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
|
|||
mesh.clusterWeights.reserve(newWeightsEnd);
|
||||
for (int weightIndex = 0; weightIndex < clusterWeights.size(); ++weightIndex) {
|
||||
// Per the GLTF specification
|
||||
uint16_t weight = std::round(clusterWeights[weightIndex] * 65535.0);
|
||||
uint16_t weight = std::round(clusterWeights[weightIndex] * 65535.0f);
|
||||
mesh.clusterWeights.push_back(weight);
|
||||
}
|
||||
mesh.clusterWeightsPerVertex = WEIGHTS_PER_VERTEX;
|
||||
|
@ -1542,6 +1542,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
|
|||
}
|
||||
|
||||
// TODO: Fix skinning and remove this workaround which disables skinning
|
||||
// TODO: Restore after testing
|
||||
{
|
||||
std::vector<int> meshToRootJoint;
|
||||
meshToRootJoint.resize(hfmModel.meshes.size(), -1);
|
||||
|
|
|
@ -1008,8 +1008,8 @@ HFMModel::Pointer OBJSerializer::read(const hifi::ByteArray& data, const hifi::V
|
|||
modelMaterial->setOpacity(hfmMaterial.opacity);
|
||||
}
|
||||
|
||||
// GO over the shapes once more to assign hte material index correctly
|
||||
for (int i = 0; i < (uint32_t) hfmModel.shapes.size(); ++i) {
|
||||
// GO over the shapes once more to assign the material index correctly
|
||||
for (uint32_t i = 0; i < (uint32_t)hfmModel.shapes.size(); ++i) {
|
||||
auto foundMaterialIndex = materialNameToIndex.find(materialNamePerShape[i]);
|
||||
if (foundMaterialIndex != materialNameToIndex.end()) {
|
||||
hfmModel.shapes[i].material = foundMaterialIndex.value();
|
||||
|
|
|
@ -63,9 +63,8 @@ void CauterizedModel::createRenderItemSet() {
|
|||
Transform::mult(transform, transform, offset);
|
||||
|
||||
// Run through all of the meshes, and place them into their segregated, but unsorted buckets
|
||||
int shapeID = 0;
|
||||
const auto& shapes = _renderGeometry->getHFMModel().shapes;
|
||||
for (shapeID; shapeID < (int) shapes.size(); shapeID++) {
|
||||
for (int shapeID = 0; shapeID < (int) shapes.size(); shapeID++) {
|
||||
const auto& shape = shapes[shapeID];
|
||||
|
||||
_modelMeshRenderItems << std::make_shared<CauterizedMeshPartPayload>(shared_from_this(), shape.mesh, shape.meshPart, shapeID, transform);
|
||||
|
|
Loading…
Reference in a new issue