   non-square image loading in OpenGL
  Does anyone know any way to load images that aren't sized to a power of two in OpenGL?  I need to load a photo(4x6 or 3x5) for use as a texture.   
  You've got a few options: pad the image to a POT size and then use texture co-ordinates to chop out the bit that you want, use the gluBuild2DMipmaps function which will take a non-POT texture or you could use the non_power_of_two extension.I've not used the extension route myself and so I can't speak for how well it's supported but either of the two first options are fine.  Probably using gluBuild2DMipmaps would be the easiest way.Hope that helps!   ;  The non_power_of_two extension works well for GF6x00+ cards and probobly for ATI X800+ cards, just make shure you have the latest drivers.I don't know about other cards though.   ;  The DevIL image library supports this as well & is pretty straightforward to use.   ;  Thanks guys.  I think DevIL is going to do the trick, if I can figure out how to get it to work with Visual Studio .NET.  If anyone knows how, I'd appreciate the help.   ;  Hi,i assume that you are already able to load and use textures in opengl?If you do, it's really easy to use non power of two textures:1. check for the GL_ARB_texture_non_power_of_two extension. 2. if its supported, load textures as normal (glTexImage2D) - no code has to change, you dont have to add anything. Just set a non power of 2 width and height in glTexImage2D and use the texture as normal. This is the easiest extension ever!If the extension is not supported, then you can either pad the image to the larger size, or use the NV_tex_rectangle extension - which is pretty well supported.;  That is easy.  I'll check on that.   ;  Well, NV_tex_rect (and EXT_tex_rect for the same issue) are very widely supported but they're quite cumbersome to use unless you're writing a very small application.In case this is your issue, you'll be very happy with them. I believe it's supported by everything after NV1x but I'm not sure. It is supported by sure means by NV2x and later.Don't even think however using texture_rect for more advanced issues. The lack of wrapping modes, the different texture target and texture coordinate scheme will make you scream. Well, this actually won't happen until you start building up something complicated.If you do, you'll find that for example, you need to retassellate geometry to accomodate simil-wrap modes, you'll have to have rect and POTD shaders and the machinery involved will rapidly pile up.For more advanced applications, ARB_npotd (or GL2 for that matter) is a must.