i want to display a 800x600 background image on an 800x600 screen. it appears that i will have to load it into a 1024x1024 texture since non power of 2 textures dont work properly. im used to working with arbitrary image sizes and this doesnt seem like a very tidy approach. am i missing something or do i just have to start thinking differently when using opengl?

i think that because i was loading some 200x200 textures and they appeared with a black border around 2 sides, i assumed that it was increasing the texture size to 256x256 without scaling the texture, cos as soon as i changed my image file to 256x256 it was fine.

excuse me if im wrong, ive been sick in bed for 3 weeks and i still cant think straight

ill go and try to write the 5 lines of code it would take to verify lol

if i stretch the image file to 1024x1024 in my image editor, it appears as intended in my program, but if i load it from the 800x600 file it appears to be shrunk. this is why i think its a POT issue. i cant imagine its just my graphics card because i havnt noticed this problem when running anyone elses programs.

OpenGL texture coordinates are "normalized" (0.0 - 1.0). texture.getWidth() would produce the same result though because OpenGL clamps the values, so anything over 1 would still be 1. I have a feeling that's not what you're talking about though and I sound like an idiot

slickutils creates power of 2 size textures in your back, that's why you have strange stretching/padding results I don't remember if there is some kind of parameter to pass to the loader to disable this thing, you should check this.

OpenGL supports non POT textures for ages, so it's not an OpenGL issue.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org