if im hiding and showing alot of entities should i add a flag for wether they are hidden or not so as to stop running hideentity and showentity on every entity be it hidden or not?
eg
type EntityMesh
field mesh, HiddenStatus
end type
for m.EntityMesh = each EntityMesh
if m\HiddenStatus = 1
if EntityInView(m\mesh,camera)
ShowEntity m\mesh
m\HiddenStatus = 0
endif
elseif m\HiddenStatus = 0
if not EntityInView(m\mesh,camera)
HideEntity m\mesh
m\HiddenStatus = 1
endif
endif
next
eg
type EntityMesh
field mesh, HiddenStatus
end type
for m.EntityMesh = each EntityMesh
if m\HiddenStatus = 1
if EntityInView(m\mesh,camera)
ShowEntity m\mesh
m\HiddenStatus = 0
endif
elseif m\HiddenStatus = 0
if not EntityInView(m\mesh,camera)
HideEntity m\mesh
m\HiddenStatus = 1
endif
endif
next