Code for overlaying dem and remote sensing imagery to generate a 3D model

Here's how I think about it, you first need to be able to read the elevation of each grid point in the DEM, then assign the elevation to the corresponding planar point of the remote sensing image, and finally load the elevation and color of each point of the remote sensing image into the OpenGL window, in this way, it's a success. There are two difficulties, reading the elevation from the DEM and then loading it into OpenGL at the end.