|
From: Frank C <li...@si...> - 2004-07-13 19:22:31
|
On 13-Jul-04, at 2:54 PM, Keith Wiley wrote: > Two approaches: > > One: represent each tile as multiple trimeshes (with identical > geometry) > but with different res textures. Only submit one trimesh per tile at a > time, as matches the distance from the camera. > > Two: only make one trimesh per tile, but change the texture the > trimesh is > using whenever its distance crosses a threshold. Why not use a combination of the two... Store all your textures in textureshader objects, and keep references to all of them. This way the textures will be in RAM when you need them, and you're not duplicating geometry. When you want to swap textures just change the trimesh's attribute set's texture shader ref to the one you need, or stick all trimeshes that use the same texture in a display group with the appropriate textureshader and don't thouch the trimesh's attribute set at all. Frank. |