FSIC Messageboard
  Tech Talk
  Question about sharing textures

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Question about sharing textures
Sv
Pilot
posted 01-17- 03:48 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Does anyone know how to guarantee that textures are shared? If two different SM files both refer the same texture path, is the texture shared in video memory- or are both identical textures loaded in?

Also, is there any savings in sharing SM objects? In other words, if many planes have the same gun, is it better to use one SM file, or does this not matter?

Much thanks!

------------------
-Sv =FC=

WWI in SDOE!

IP: Logged

Bryan Russell
Pilot
posted 01-17- 07:26 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
A texture is defined as being unique based both on its actual image and its properties. I'm pretty sure that the path/filename isn't considered. When the texture is loaded, a CRC is created based on its image and property fields, and this CRC is used to see if the texture already exists in the texture cache.

So, for example you could have two textures that are physically located in different locations, with different names, and as long as the properties (i.e the flags) and the image were the same there would only be one texture in memory.

If you share the gun objects using a file reference the mesh information should be shared.

IP: Logged

Sv
Pilot
posted 01-18- 10:52 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Thanks Bryan

IP: Logged

Bryan Russell
Pilot
posted 01-18- 07:48 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
Just thought of an important point regarding this thing (you can probably figure it out but, just to spell it out ).

If you have a plane that wants to use a shared texture, you must make sure all of the texture properties are identical, even if you use the same physical texture.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Fighter Squadron Information Center

(This site Copyright (c) 1999 Inertia LLC)

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.45c