detect if drivers support non-power-of-two texture

how can i query whether my drivers support non-power-of-two textures?

In GL 2.0 it’s a core feature. So if you detect a 2.0 compatible driver you’ll have it. Otherwise check if the GL_ARB_texture_non_power_of_two extension is supported.

To get the list of extensions supported by your hardware and OpenGL version call glGetString.

You can also look for GL_ARB_texture_rectangle which allow to load NPOT textures but in a more limited way: no mipmaps, no normalized texture coordinates, some wrapping modes unsupported, etc…