I get some strange artifacting with textures depending on their size. I run OpenGL 3.3 with an GTX 580 so it should definitely support non power of two textures. I've narrowed down the problem specifically to the texture's size, I've tried checking if transparency had anything to do with it, color channels etc.
As you can see, the 512x512 and 300x300 textures look just fine but the 437x437 is all distorted. What could be the cause of this and how can it be fixed? I could of course just stick to power of two textures which seem to work fine but since this is an personal educational project I really want to understand what's going on.
glTexImage2D
and the sampler I'm using is set to useGL_LINEAR
forGL_TEXTURE_MIN_FILTER
andGL_TEXTURE_MAG_FILTER
. \$\endgroup\$ – Havsmonstret Jul 14 '15 at 9:03glPixelStorei(GL_UNPACK_ALIGNMENT, 1)
\$\endgroup\$ – kolrabi Jul 14 '15 at 10:24