Reputation: 25
I'm using Slick Util's Texture class to load textures for lwjgl, but apparently that forces your texture to a power of 2.
How would you use a texture that's not a power of 2? (I really don't want to add transparent pixels to the edge of the image to make it a power of 2.)
I've seen somewhere that it's possible, but I can't find any way of doing it.
Upvotes: 1
Views: 867
Reputation: 1348
The reason the stick-utils package forces you to use power-of-two textures is this is what graphics cards like to load. Where possible, you should pack all your images in to a large power-of-two texture and draw from that instead of loading all the textures separately.
So whilst it's not impossible, there is a reason it is made hard.
Upvotes: 2