Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Visualization/TKD3DHost/D3DHost/D3DHost_GraphicDriver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ occ::handle<Graphic3d_CView> D3DHost_GraphicDriver::CreateView(
{
occ::handle<D3DHost_View> aView = new D3DHost_View(theMgr, this, myCaps, &myStateCounter);
myMapOfView.Add(aView);
for (NCollection_List<occ::handle<Graphic3d_Layer>>::Iterator aLayerIter(myLayers);
aLayerIter.More();
aLayerIter.Next())
for (size_t i = 0; i < myLayers.Size(); ++i)
{
const occ::handle<Graphic3d_Layer>& aLayer = aLayerIter.Value();
const occ::handle<Graphic3d_Layer>& aLayer = myLayers.Value(i);
aView->InsertLayerAfter(aLayer->LayerId(), aLayer->LayerSettings(), Graphic3d_ZLayerId_UNKNOWN);
}
return aView;
Expand Down
14 changes: 7 additions & 7 deletions src/Visualization/TKOpenGl/OpenGl/OpenGl_FrameStats.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ void OpenGl_FrameStats::updateStatistics(const occ::handle<Graphic3d_CView>& the
|| (aBits & Graphic3d_RenderingParams::PerfCounters_Layers) != 0
|| toCountGroups;

myCountersTmp[Graphic3d_FrameStatsCounter_NbLayers] = aView->LayerList().Layers().Size();
myCountersTmp[Graphic3d_FrameStatsCounter_NbLayers] =
static_cast<int>(aView->LayerList().Layers().Size());
if (toCountStructs || (aBits & Graphic3d_RenderingParams::PerfCounters_Layers) != 0)
{
const int aViewId = aView->Identification();
for (NCollection_List<occ::handle<Graphic3d_Layer>>::Iterator aLayerIter(
aView->LayerList().Layers());
aLayerIter.More();
aLayerIter.Next())
const int aViewId = aView->Identification();
const NCollection_LinearVector<occ::handle<Graphic3d_Layer>>& aLayers_ =
aView->LayerList().Layers();
for (size_t aLayerIdx_ = 0; aLayerIdx_ < aLayers_.Size(); ++aLayerIdx_)
{
const occ::handle<OpenGl_Layer>& aLayer = aLayerIter.Value();
const occ::handle<OpenGl_Layer>& aLayer = aLayers_.Value(aLayerIdx_);
myCountersTmp[Graphic3d_FrameStatsCounter_NbStructs] += aLayer->NbStructures();
if (theIsImmediateOnly && !aLayer->LayerSettings().IsImmediate())
{
Expand Down
6 changes: 2 additions & 4 deletions src/Visualization/TKOpenGl/OpenGl/OpenGl_GraphicDriver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -788,11 +788,9 @@ occ::handle<Graphic3d_CView> OpenGl_GraphicDriver::CreateView(
{
occ::handle<OpenGl_View> aView = new OpenGl_View(theMgr, this, myCaps, &myStateCounter);
myMapOfView.Add(aView);
for (NCollection_List<occ::handle<Graphic3d_Layer>>::Iterator aLayerIter(myLayers);
aLayerIter.More();
aLayerIter.Next())
for (size_t i = 0; i < myLayers.Size(); ++i)
{
const occ::handle<Graphic3d_Layer>& aLayer = aLayerIter.Value();
const occ::handle<Graphic3d_Layer>& aLayer = myLayers.Value(i);
aView->InsertLayerAfter(aLayer->LayerId(), aLayer->LayerSettings(), Graphic3d_ZLayerId_UNKNOWN);
}
return aView;
Expand Down
Loading
Loading