How to load over 50 textures faster

Started by
4 comments, last by Neviens 19 years, 10 months ago
If I have a game with over 50 textures, what can I do to load fast.Every game have a textures but they load very fast!But in my game textures are loading slow.How can I save rendered texture in file or what can I do to do this wor faster for my game!please help me with that!
Advertisement
seeing as how you didnt post any source as to how you''re loading textures i''m gonna give a general bit of advice.

If you''ve writen a custom loader that does all the file IO stuff make sure its not reading in one byte at a time. read the whole file into a buffer and use that instead. this will cut your load time.
i is 1337
Show us how you load them now and we''ll se what can be improved.

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
Add some timing-code to different stages of your handling of textures to find out what''s really the problem.
You could use DDS-format instead of (raw|tga|jpg|whatever), a single DDS can hold different stages of mipmaps, instead of having to generate them at loadtime.

Defragged your harddrive lately? If it''s badly fragmented it also shows when you''re after fast loading.
A last suggestion would be to make sure your textures are in the correct format before uploading so the driver won''t have to swap around bytes to get it right.
Here''s a first optimization: if you are using gluBuild2DMipmaps, you could precalculate yourself all the mipmap levels so that you''d only have to upload them to OpenGL.

Y.
or just load the first mipmap lvl and use the SGI extension to generate the mipmaps in hardware (forgotten its name atm)

This topic is closed to new replies.

Advertisement