Menu

#125 Require FaceGroup.Create in GLVectorFileObjects.pas

open
nobody
None
5
2009-10-30
2009-10-30
Anonymous
No

When using module GLSViewer from AdvDemos section, could not open .wrl files. I tracked the problem to a missing constructor in TFaceGroup. All instances of TFaceGroup (or inherited classes) are not created with TFaceGroup.CreateOwned and therefore this Create method is required so FLightMapIndex is always initialized.

Add to TFaceGroup interface section...
constructor Create; override;

Add to TFaceGroup implememtation section...
constructor TFaceGroup.Create;
begin
LightMapIndex:=-1;
inherited;
end;

Thank you

Discussion