Mapping texture on sphere with shader programs.

Hello folks,

Also, I am studying about virtual globe for programming because I am trying to write my own orbital flight simulator. I have a book called “3D Engine Design for Virtual Globe” but code are written in C# language. I want to learn how to write C++ program and shader program to generate rotating planet sphere/ellipsoid with planet map texture wrapping.

I googled for that and found some information but how about tutorial guides?


There are 2 ways to do it.

  1. Using a 2D texture
  2. Using a cubemap

Neither method require shaders but using shaders is always a good idea.

This isn’t a tutorial but it explains both methods + short code