KStars SoC update
So now that I have something ‘visible’ to show, instead of just internal changes, I thought I’d post an update on my progress with KStars and OpenGL.
In part due to the disorganized nature of the existing codebase and in part due to my under-estimation of some things (not to mention Hofstadter’s Law) I ended up not getting as much done as I’d have liked, because I spent a lot — maybe even a bit too much — time refactoring. What I did is to get rid of all calls to QPainter in the individual SkyComponent::draw() functions, and replaced them with calls to a SkyPainter class that acts as an interface, allowing one to draw things on the sky without regard to the actual backend. The actual drawing is done by either a SkyQPainter or a SkyGLPainter, but the sky components (e.g., stars, deep sky objects, constellation lines, &c.) don’t know anything about how the drawing is actually done.
As you can see from the pictures, most of the sky objects work. The things that need ‘fixing’ are the milky way (sort of), the labels, the images of planets, the images of deep sky objects, the overlays, and the horizon. I also have to make the two backends (GL and QPainter) play nice with each other. The Milky way “sort of” needs fixing because of different assumptions made by QPainter and OpenGL: QPainter does not require that polygons be convex, while GL does. After I solve the issues listed above, I am going to try to implement light pollution simulation and improve the drawing speed.