Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Problem Loading Part Of Texture

  1. #1
    Newbie Newbie
    Join Date
    Jan 2013

    Question 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,

    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?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts