This is incredibly easy to implement for both vector and raster charts
. There are two possible options.. If you want the icons and other bitmaps to be projected or not. Consider also things like grib wind
arrows. If you want them projected, then using the framebuffer object will be required and it's all a bit more complicated but still possible, at least in opengl mode.
I would try messing with the other axes in the glRotated call besides only the z axis before swapping buffers. You will need to extend the viewport class to include these angles, and have it calculate the lat-lon bounding box accordingly, and extend the routines that compute screen
coordinates from lat/lon and lat/lon from screen
coordinates. This is a matter of applying a matrix multiplication instead of the sine and cosine used for simple viewport rotation.
Some kind of guard is needed as this will only work in opengl mode, at least for raster charts
. For vector charts it should work in non opengl mode as well.
I personally would like to go a bit further, and implement vector and fragment shaders to convert to polar, and ellipsoidal coordinates on the fly as well. This can work in conjunction with a projected viewport.