Detecting the Shader Model
This question has come up a few times and the best thread can be found here :
Short explanation below:
If you can detect GL_NV_vertex_program3, then you have a SM 3.0 GPU
GL_NV_fragment_program2 would do as well.
This works for nVidia GPUs
ATI 3.0 GPUs advertize GL_ATI_shader_texture_lod
If those extensions are not present and if your GL version 2.0, then you have a SM 2.0 GPU.
In glhlib 1.55, I have added glhGetShaderModelAsString and glhGetShaderModel that does just that. http://www.geocities.com/vmelkon/glhlibrary.html
Another method is to write some specific shaders and see if they compile.
If they do compile, check the info log for the presence of the word "software"