mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
Merge pull request #4801 from Atlante45/fix_wireframe
Fix wireframe render for meshes with special properties
This commit is contained in:
commit
9d573fa0fc
1 changed files with 7 additions and 1 deletions
|
@ -2068,6 +2068,12 @@ void Model::segregateMeshGroups() {
|
||||||
bool hasSpecular = mesh.hasSpecularTexture();
|
bool hasSpecular = mesh.hasSpecularTexture();
|
||||||
bool hasLightmap = mesh.hasEmissiveTexture();
|
bool hasLightmap = mesh.hasEmissiveTexture();
|
||||||
bool isSkinned = state.clusterMatrices.size() > 1;
|
bool isSkinned = state.clusterMatrices.size() > 1;
|
||||||
|
bool wireframe = isWireframe();
|
||||||
|
|
||||||
|
if (wireframe) {
|
||||||
|
translucentMesh = hasTangents = hasSpecular = hasLightmap = isSkinned = false;
|
||||||
|
}
|
||||||
|
|
||||||
QString materialID;
|
QString materialID;
|
||||||
|
|
||||||
// create a material name from all the parts. If there's one part, this will be a single material and its
|
// create a material name from all the parts. If there's one part, this will be a single material and its
|
||||||
|
@ -2085,7 +2091,7 @@ void Model::segregateMeshGroups() {
|
||||||
qCDebug(renderutils) << "materialID:" << materialID << "parts:" << mesh.parts.size();
|
qCDebug(renderutils) << "materialID:" << materialID << "parts:" << mesh.parts.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderKey key(translucentMesh, hasLightmap, hasTangents, hasSpecular, isSkinned, isWireframe());
|
RenderKey key(translucentMesh, hasLightmap, hasTangents, hasSpecular, isSkinned, wireframe);
|
||||||
|
|
||||||
// reuse or create the bucket corresponding to that key and insert the mesh as unsorted
|
// reuse or create the bucket corresponding to that key and insert the mesh as unsorted
|
||||||
_renderBuckets[key.getRaw()]._unsortedMeshes.insertMulti(materialID, i);
|
_renderBuckets[key.getRaw()]._unsortedMeshes.insertMulti(materialID, i);
|
||||||
|
|
Loading…
Reference in a new issue