glTexCoord for images with many tiles?

Take a look at this image

It’s a 7824 image of the alphabet, with each letter in a 66, so 52 total squares.

Wouldn’t using glTexCoord to get a single letter out of that image get kind of tedious?

	GL11.glTexCoord2f(0,0);
	
	GL11.glTexCoord2f(1/13,0);
	
	GL11.glTexCoord2f(1/13,1/4);
	
	GL11.glTexCoord2f(0,1/4);

Since 1/13 of 78 is 6 and 1/4 of 24 is 6, is this kind of what I’m looking to do, to single out a letter? I’m just making sure this is the way to go. Thanks

EDIT: The 1/13 and 1/4 would be decimals in the actual code so that it would actually work, this is just so that it’ll read easier(just like the glVertex3f isn’t there)

That’s how you do it all right, but you don’t do it by hand. You take advantage of the fact that the sub-images are all uniform size and write a class to do the calculations and generate the vertices for you. There’s many implementations of this class out there; take a look at just about any “tile map” implementation (I have one, but it’s in Scala).

Thank you; looks like I’m on the right track then. Getting it to calculate all that automatically sounds like a good(and necessary) step from here, I’ll try to work that out next.