Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Eber Kain

How to store up all your .tga images and still use em

This topic is 6296 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone please insert a tutorial here? i have around 100 textures for my program, and it looks rather mangled in the folder right now.

Share this post


Link to post
Share on other sites
Advertisement
Just make a file with a header that contains the number of textures, the size of each texture and/or the offset from the beginning of the file to each texture. That way you just jump to the texture''s beginning and pretend that it was a normal texture .

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/

Share this post


Link to post
Share on other sites
but what about if you''re using a function (such as an API function) that needs a filename rather than an open file pointer? would you copy the texture data to a temp file and load it from there?

just wondering, i wanted to do this with my game engine, but i couldn''t think of an efficent way of doing so.

dave



--
david@neonstar.net
neonstar entertainment

Share this post


Link to post
Share on other sites
It''s pretty easy to write a TGA loader (which is what he was asking about in his title) of your own, or just copy Nehe''s and add whatever features you need to it . I don''t know how to get around API functions that require a file though, since OpenGL never requires you to give it a file, and that''s the main graphics API I use. The only other files (besides textures) I pack together are custom formats anyway...

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!