LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: sprite on July 21, 2003, 00:30:14

Title: Texture Loader
Post by: sprite on July 21, 2003, 00:30:14
Hello =)

Has anyone implemented an all purpose texture loader that loads textures of any size and supports most major image formats (such as jpg, bmp, png, etc) ?  My current textureloader only supports square jpg files that have a height / width of a power of 2.
Title: Texture Loader
Post by: princec on July 21, 2003, 11:17:35
Sun :)

ImageIO will do what you need. Really you don't want an all-purpose texture loader though - you need to settle on 1 or maybe 2 formats for your game and use just those.

Don't forget you can have rectangular textures in GL. The dimensions are independent of each other but still have to be powers of 2.

Cas :)
Title: Thanks
Post by: sprite on July 21, 2003, 21:27:46
Yeah good point :D  Thanks for the rectangular texture reminder... I hadn't thought of that.