How can I bind my texture in the correct orientation? I have successfully completed a working program that draw a rotating sphere with a map of the world as the texture, simulating the earth in space.  However, the texture is bound on it's side, i.e. all the continents are on their sides and the poles are shown as the sphere spins on the y-axis.  I used the following reference to build the rotating sphere:
http://www.songho.ca/opengl/gl_sphere.html#:~:text=In%20order%20to%20draw%20the,triangle%20strip%20cannot%20be%20used.
and the stb_image library (https://github.com/nothings/stb) to load a JPEG image for the texture.
I've tried a couple of things like:
actual rotation of the JPEG image,
rotating the array that holds the texture coordinates,
rotating the array that holds the indices
Everything is good apart from the orientation of the image bound for texturing.  Any advice/pointers would be appreciated.
Binding the image is unrelated to its orientation. A shot in the dark is that your texture coordinates are either reversed or computed with the orientation in the wrong direction. You could just rotate the image as a work around. The main issue here is whether the upper left corner is your origin, or the lower left corner is the origin. But neither of these explain the image being sideways. At any rate, look at your texture coordinates, how the image is being copied into memory, how is is being passed to opengl, and the texture coordinates.