Problem Loading Part Of Texture

Hello There,

I am currently creating a game in OpenGl and GLUT on xCode. At the moment, I have gotten the game to load whole textures and display them perfectly. However, I wish to only display part of the texture.

I have various sprite sheets that vary in size and I want to load a sprite from one, how would i do this?

Thanks In Advance,
Matt

P.S - Sorry if the question was not too detailed, if you need more information then please ask. The jist of the question is: how do i load only part of a texture?

Most texture formats do not readly lend themselves to partial loads. The most partical is probably to load the whole image, copy the bit you want and discard the original image. If you don’t want to do this you will need to write a customised loader.