Re: Loading textures on an RE

New Message Reply Date view Thread view Subject view Author view

Gary E Williams (gewillia++at++afit.af.mil)
Tue, 16 Apr 1996 12:55:03 -0400


Roy,

I must qualify my suggestion with the disclaimer that I'm still a relative
novice to Performer myself and I hope someone with more knowledge posts a
better /more complete solution, but I'll give you what I've got.

We have a large solar system simulation which uses texture maps for planets,
moons, asteroids, and even some satellites. We use object oriented programming
techniques with C++, i.e. all of our models are objects. The main rountine
constructor allocates memory for all the instances of our objects and we load
the models in the simulation initialization phase which is called shortly after
the constructor is executed. After we've initialized the simulation, we
execute the following code:

Players_Texture_List = pfuMakeTexList ( (pfNode *)(Renderobj->players));

where Renderobj->players is the node in the Performer tree above all the
models. This builds a list of all textures used in the simulation so the
textures are loaded before the simulation runs. As a result, the textures are
already in memory and we don't have the "stalls" during execution to load them.

I hope this helps and if anyone else cares to add to anything I've said, please
feel free - I'm always glad to gain a better understanding of how things work.

Good luck.

Gary

-- 
*************************************************************

GARY E. WILLIAMS, Capt, USAF MS Student: Modeling & Simulation Air Force Institute of Techonology (AFIT)

gewillia++at++afit.af.mil http://www.afit.af.mil/ENGgraphics/people/gewillia/index.html


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:42 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.