mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash in text rendering
This commit is contained in:
parent
20f9bf4318
commit
c8f9505d1e
@ -145,6 +145,7 @@ void RivContourMapProjectionPartMgr::appendContourLinesToModel(const cvf::Camera
|
|||||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||||
part->setDrawable(contourDrawable.p());
|
part->setDrawable(contourDrawable.p());
|
||||||
part->setEffect(effect.p());
|
part->setEffect(effect.p());
|
||||||
|
part->setPriority(RivPartPriority::MeshLines);
|
||||||
part->setSourceInfo(new RivMeshLinesSourceInfo(m_contourMapProjection.p()));
|
part->setSourceInfo(new RivMeshLinesSourceInfo(m_contourMapProjection.p()));
|
||||||
|
|
||||||
model->addPart(part.p());
|
model->addPart(part.p());
|
||||||
@ -153,11 +154,7 @@ void RivContourMapProjectionPartMgr::appendContourLinesToModel(const cvf::Camera
|
|||||||
}
|
}
|
||||||
for (auto labelDrawableRef : labelDrawables)
|
for (auto labelDrawableRef : labelDrawables)
|
||||||
{
|
{
|
||||||
caf::MeshEffectGenerator meshEffectGen(cvf::Color3::BLACK);
|
cvf::ref<cvf::Effect> effect = new cvf::Effect;
|
||||||
meshEffectGen.setLineWidth(1.0f);
|
|
||||||
meshEffectGen.createAndConfigurePolygonOffsetRenderState(caf::PO_2);
|
|
||||||
|
|
||||||
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
|
||||||
|
|
||||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||||
part->setDrawable(labelDrawableRef.p());
|
part->setDrawable(labelDrawableRef.p());
|
||||||
@ -228,7 +225,7 @@ cvf::ref<cvf::Part> RivContourMapProjectionPartMgr::createProjectionMapPart(cons
|
|||||||
part.p(), textureCoords.p(), mapper, 1.0f, caf::FC_NONE, true, m_parentContourMap->backgroundColor());
|
part.p(), textureCoords.p(), mapper, 1.0f, caf::FC_NONE, true, m_parentContourMap->backgroundColor());
|
||||||
|
|
||||||
part->setSourceInfo(new RivObjectSourceInfo(m_contourMapProjection.p()));
|
part->setSourceInfo(new RivObjectSourceInfo(m_contourMapProjection.p()));
|
||||||
|
part->setPriority(RivPartPriority::BaseLevel);
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user