You can check with glGetfor ARB_texture_non_power_of_two or use GLEW.
Edit to reflect comments: Like OpenGL 2.0, this function is required, and ARB_texture_non_power_of_two does not need to be defined. How to find the current version is described here . As Jerry points out: depending on the GPU, the function can be implemented in software, and the performance will not be great if you use textures with a size not for two.
source
share