Jump to content
  • Advertisement
Sign in to follow this  
try_catch_this

Program to make 1 big texture.

This topic is 4872 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

I have a bunch of small images that i would like to make one texture of to save on binding calls. Anyone know of a program that can do this already or do I have to make one myself? And manually doing it would be very tedious. [Edited by - try_catch_this on June 15, 2005 4:06:06 AM]

Share this post


Link to post
Share on other sites
Advertisement
Writing it yourself isn't that hard. Especially if you've got a decent prototyping language to use, like VB (which has lots of image loading support, and BMP save support; converting to PNG/etc is for real tools) or even, in a pinch, PHP + the GD library.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you could use GD library within a compiled c++-based program

Share this post


Link to post
Share on other sites
You could keep your textures in individual files, and just join them all together at runtime (as a one-off operation, using the CPU). This would make it easy to find the right one, as you could store the coordinates (or id) of each individual file in some data structure for easy access later.

Or you could run a batch process - for example using ImageMagick's commandline "montage" program to stitch them together appropriately. You'll need to script this and ensure that your program has data at runtime which enables it to find the right part of the texture.

Personally I might use that approach - using ImageMagick to montage all files in the directory (in alpha filename order), then a script which lists the files and creates a .h file containing constants (or maybe an enum) with the filenames in, so you can refer to them at runtime without too much effort.

What I've done before, is store each frame of an animated texture in similar filenames (explosion00, explosion01 etc), so that when they're sorted into alpha order, they come out in the right order. I then just refer to the ID of the first one and add an offset for the animation frame number.

Mark

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://www.boutell.com/gd/

Share this post


Link to post
Share on other sites
Sign in to follow this  

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