Jump to content
  • Advertisement
Sign in to follow this  
Rokkuman

Texture Coorindates

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

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

Share this post


Link to post
Share on other sites
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!