mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1233 Improve system for setting part priorities
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "RivCellEdgeEffectGenerator.h"
|
||||
#include "RivPartPriority.h"
|
||||
#include "RivResultToTextureMapper.h"
|
||||
#include "RivScalarMapperUtils.h"
|
||||
#include "RivSourceInfo.h"
|
||||
@@ -164,8 +165,7 @@ void RivGridPartMgr::generatePartGeometry(cvf::StructGridGeometryGenerator& geoB
|
||||
caf::MeshEffectGenerator effGen(prefs->defaultGridLineColors());
|
||||
eff = effGen.generateCachedEffect();
|
||||
|
||||
// Set priority to make sure fault lines are rendered first
|
||||
part->setPriority(10);
|
||||
part->setPriority(RivPartPriority::PartType::MeshLines);
|
||||
|
||||
part->setEnableMask(meshSurfaceBit);
|
||||
part->setEffect(eff.p());
|
||||
@@ -200,8 +200,7 @@ void RivGridPartMgr::updateCellColor(cvf::Color4f color)
|
||||
|
||||
if (color.a() < 1.0f)
|
||||
{
|
||||
// Set priority to make sure this transparent geometry are rendered last
|
||||
if (m_surfaceFaces.notNull()) m_surfaceFaces->setPriority(100);
|
||||
if (m_surfaceFaces.notNull()) m_surfaceFaces->setPriority(RivPartPriority::PartType::Transparent);
|
||||
}
|
||||
|
||||
m_opacityLevel = color.a();
|
||||
|
||||
Reference in New Issue
Block a user