Sign in to follow this  
Rokkuman

Texture Coorindates

Recommended Posts

Rokkuman    122
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?

Share this post


Link to post
Share on other sites
Ravuya    135
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.

Share this post


Link to post
Share on other sites
Byron    119
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?

Share this post


Link to post
Share on other sites
iosys    139
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this