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

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
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