I copied the corrected code here to apply my own texture from a solar imaging dataset onto an OpenGL sphere. In doing so I noticed that the texture does not wrap entirely around the sphere - only the "front half" - and the lighting shadow is not applied (also evident in the answer to that question).
How do you modify the code to wrap the texture around the entire sphere?
Here is the texture image which is data in a 360-degree longitude x sine(latitude) format (which actually should be transformed to longitude x latitude before applying to the sphere, but that's a detail...):
And here's the result of the texture mapping which shows that the image is only applied to the front/visible hemisphere: