texture2D vs textureLOD

Hello Everybody.
Can anybody explain me in short what is the difference between texture2D and textureLod, and when one should be preferred over the other?

Thanks,
Heinrich

According to
http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.40.05.pdf

texture2D has been deprecated in favor of texture. However, if you are targeting GLSL 1.10 , you can still use texture2D.

texture2D is used in the fragment shader.
textureLod is used in the vertex shader since the derivatives are not computed. There are no derivatives because a vertex is just a point. You need to select the mipmap yourself.

Some texture functions (non-“Lod” and non-“Grad” versions) may require implicit derivatives. Implicit
derivatives are undefined within non-uniform control flow and for vertex shader texture fetches.

Ok, and what is mipmap? (if this question is too stupid fell free not to answer…).

Please read the Texture article on the OpenGL Wiki.