Texture Coorindates

Started by
2 comments, last by iosys 16 years, 11 months ago
In order to find the locations of the sprites on my images in OpenGL, I basically open MSPaint, find the coordinates for each of the four corners of each sprite, and manually input it into a file for my program to scan through and use as locations. Is there a slightly more humane way of doing this, or is this pretty much how it's gonna work out?
Advertisement
You could try making all your sprites the same size; in that case, generating the texture coordinates is trivial.

You could also write a tool to take a set of images, bolt them onto a sprite sheet and output the texture coordinate file for you. That would save a lot of time.
Yeah - that has to suck. Make an app to generate the coordinates for you especially if you have hundreds of little sprites. There must be some out there for doing this kind of thing?
ByronBoxes
What I did was create a sprite editor program which shows the sprite sheet(s) and allows you to drag a box around certain parts of the sheet to define frames for animations. All the animation definitions were ultimately stored in a "sprite.txt" file.

Hope that helps.
______________________________Perry Butler aka iosysiosys Website | iosys Music | iosys Engine

This topic is closed to new replies.

Advertisement