Non power-of-two images

I'm looking to load and display many photographs in quads, with the ability to show them full size, or scale the quad down to show them quite small.  I've been looking at a few ways of doing it, and came across Apple's notes on how to load images that aren't power-of-two:  http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/chapter_10_section_4.html



  • Can anybody point me in the right direction as to how you, as seasoned jME developers, might tackle the issue?

  • Is there an easy way?

  • Will I have to create a mesh and then add a number of textures to it, in a similar manner to the above link?



Any pointers or tips would be much appreciated.

Thanks!

jME supports NPOT textures if your video card does, otherwise it will resize it to a power of 2 size automatically.

Cool, thank you.  Is the resizing lossy or lossless?

Isn't resizing lossy by definition?

I would add a border to the images. When the image is 256x222, just add a 34 width border. So you have 256x256. Then you can use texture coordinates to show the part you want.

This way you waste some memory, but for a simple photograph-viewer it is ok. Don't know what you want to do exactly…