mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-28 16:09:46 -06:00
Small fix and update ghoul
This commit is contained in:
Submodule ext/ghoul updated: 3a1d641261...6560b217b3
@@ -311,16 +311,16 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary)
|
||||
|
||||
// Combine all models into one ModelGeometry
|
||||
for (unsigned int i = 1; i < geometries.size(); ++i) {
|
||||
for (const ghoul::io::ModelMesh& mesh : geometries[i]->meshes()) {
|
||||
for (unsigned int m = 0; m < geometries[i]->meshes().size(); ++m) {
|
||||
combinedGeometry.meshes().push_back(
|
||||
std::move(mesh)
|
||||
std::move(geometries[i]->meshes()[m])
|
||||
);
|
||||
}
|
||||
|
||||
for (const ghoul::modelgeometry::ModelGeometry::TextureEntry& texture
|
||||
: geometries[i]->textureStorage())
|
||||
{
|
||||
combinedGeometry.textureStorage().push_back(std::move(texture));
|
||||
for (unsigned int t = 0; t < geometries[i]->textureStorage().size(); ++t) {
|
||||
combinedGeometry.textureStorage().push_back(
|
||||
std::move(geometries[i]->textureStorage()[t])
|
||||
);
|
||||
}
|
||||
}
|
||||
_geometry = std::make_unique<ghoul::modelgeometry::ModelGeometry>(
|
||||
|
||||
@@ -154,20 +154,23 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di
|
||||
));
|
||||
}
|
||||
|
||||
if (geometries.size() > 0) {
|
||||
if (!geometries.empty()) {
|
||||
ghoul::modelgeometry::ModelGeometry combinedGeometry =
|
||||
std::move(*geometries[0].release());
|
||||
|
||||
// Combine all models into one ModelGeometry
|
||||
for (unsigned int i = 1; i < geometries.size(); ++i) {
|
||||
for (const ghoul::io::ModelMesh& mesh : geometries[i]->meshes()) {
|
||||
combinedGeometry.meshes().push_back(std::move(mesh));
|
||||
for (unsigned int m = 0; m < geometries[i]->meshes().size(); ++m) {
|
||||
combinedGeometry.meshes().push_back(
|
||||
std::move(geometries[i]->meshes()[m])
|
||||
);
|
||||
}
|
||||
|
||||
for (const ghoul::modelgeometry::ModelGeometry::TextureEntry& texture
|
||||
: geometries[i]->textureStorage())
|
||||
for (unsigned int t = 0; t < geometries[i]->textureStorage().size(); ++t)
|
||||
{
|
||||
combinedGeometry.textureStorage().push_back(std::move(texture));
|
||||
combinedGeometry.textureStorage().push_back(
|
||||
std::move(geometries[i]->textureStorage()[t])
|
||||
);
|
||||
}
|
||||
}
|
||||
_geometry = std::make_unique<ghoul::modelgeometry::ModelGeometry>(
|
||||
|
||||
Reference in New Issue
Block a user