Preloading textures for entire solarsystem
Posted: 15.05.2002, 04:46
I dont know how it is with other peoples systems but mine always jumped when travelling to an object which the texture hasnt been loaded for yet.
I added this method to render.cpp
void Renderer::loadAllTextures(SolarSystem* system)
it recursivly goes through a solarsystem loading the textures for each body with void Renderer::loadTextures(Body* body)
I execute this once when celestia starts up and everytime the observer travels to a new system.
Advantages:
Once loaded travelling around a solarsystem remains smooth. Except when approaching an object with a large *.3ds model (apollo). Any chance of a preloadMesh method Chris?
Disadvantages :
Initial memory usage goes from 16M to 60M.
There is a larger noticable pause when starting and when travelling to a new system with lots of new textures. (the 18 Sco addon for example.)
these changes are in the mostlyharmless cvs tree.
chris,
Ive also created a getMass method for stars. its very similar to your getTemp method and is based of various internet data I found. It is reasonablly accurate for the main sequence stars and severly fudged for the other sequence stars.
I added this method to render.cpp
void Renderer::loadAllTextures(SolarSystem* system)
it recursivly goes through a solarsystem loading the textures for each body with void Renderer::loadTextures(Body* body)
I execute this once when celestia starts up and everytime the observer travels to a new system.
Advantages:
Once loaded travelling around a solarsystem remains smooth. Except when approaching an object with a large *.3ds model (apollo). Any chance of a preloadMesh method Chris?
Disadvantages :
Initial memory usage goes from 16M to 60M.
There is a larger noticable pause when starting and when travelling to a new system with lots of new textures. (the 18 Sco addon for example.)
these changes are in the mostlyharmless cvs tree.
chris,
Ive also created a getMass method for stars. its very similar to your getTemp method and is based of various internet data I found. It is reasonablly accurate for the main sequence stars and severly fudged for the other sequence stars.