Hello Guest

[CLOSED] Texture sheet help

  • 2 Replies
  • 4522 Views
[CLOSED] Texture sheet help
« on: December 11, 2012, 06:38:29 »
Ok lets say ive got a texture sheet that is 256x256 which holds 4 64x64 textures. Im using slick and I only want to use bind texture once to draw a texture onto a quad. How could a do this, An example of the rendering code would be great but pointing me to some documentation be ok.
« Last Edit: December 11, 2012, 21:07:13 by th3barri3 »

Re: Texture sheet help
« Reply #1 on: December 11, 2012, 15:57:01 »
As far as i know SLICK does not have inhouse support for sub textures. Maybe there is some iam missing, but if not you have to handle it yourself with the corresponding opengl command ie glSubTexImage2D. So you would only need to bind it one time for accessing each of the four sub textures.

Re: Texture sheet help
« Reply #2 on: December 11, 2012, 21:06:45 »
Thanks that, it was putting me on the track but im a bit of a gl noob, just brought OpenGL Programming Guide 3.1 so gonna read that and learn from it. Thanks for your help.