void OpenGl_Layer::Render (const Handle(OpenGl_Workspace)& theWorkspace,
const OpenGl_GlobalLayerSettings& theDefaultSettings) const
{
- TEL_POFFSET_PARAM anAppliedOffsetParams = theWorkspace->AppliedPolygonOffset();
+ Graphic3d_PolygonOffset anAppliedOffsetParams = theWorkspace->AppliedPolygonOffset();
// separate depth buffers
if (IsSettingEnabled (Graphic3d_ZLayerDepthClear))
// handle depth offset
if (IsSettingEnabled (Graphic3d_ZLayerDepthOffset))
{
- theWorkspace->SetPolygonOffset (Aspect_POM_Fill,
- myLayerSettings.DepthOffsetFactor,
- myLayerSettings.DepthOffsetUnits);
+ Graphic3d_PolygonOffset aLayerPolygonOffset;
+ aLayerPolygonOffset.Mode = Aspect_POM_Fill;
+ aLayerPolygonOffset.Factor = myLayerSettings.DepthOffsetFactor;
+ aLayerPolygonOffset.Units = myLayerSettings.DepthOffsetUnits;
+ theWorkspace->SetPolygonOffset (aLayerPolygonOffset);
}
else
{
- theWorkspace->SetPolygonOffset (anAppliedOffsetParams.mode,
- anAppliedOffsetParams.factor,
- anAppliedOffsetParams.units);
+ theWorkspace->SetPolygonOffset (anAppliedOffsetParams);
}
// handle depth write
theWorkspace->IsCullingEnabled() ? renderTraverse (theWorkspace) : renderAll (theWorkspace);
// always restore polygon offset between layers rendering
- theWorkspace->SetPolygonOffset (anAppliedOffsetParams.mode,
- anAppliedOffsetParams.factor,
- anAppliedOffsetParams.units);
+ theWorkspace->SetPolygonOffset (anAppliedOffsetParams);
// restore environment texture
if (!myLayerSettings.UseEnvironmentTexture)