I have this code in a loop:
Handle_AIS_Shape aisShape=new AIS_Shape(shape);
theContext->SetDisplayMode(aisShape, 1, Standard_False);
and this out of the loop:
I have to draw lots of object but not during the loop, but after everything is computed.
Everything works fine with this code except selection of objects does not.
Something like this in loop works with selection, but its displaying objects as the loop progresses. And gets realy slow after lots of objects...:
Handle(AIS_Shape) aisShape=new AIS_Shape(shape);
myContext->SetDisplayMode(aisShape, 1, Standard_False);
Help would be appreciated on how to fix the first example to work with selection.