I just merged the branch with the changes described in the previous
email with trunk. I hope nothing is broken!
On Mon, Nov 17, 2008 at 6:30 PM, Fabien Chéreau
> Dear all,
> I started a big design change on Projector/StelCore API in order to
> handle drawings in a more efficient and safe way.
> The requirements were:
> - Allow use of multi-threading in display and computational intensive methods.
> - Allow GPU optimizations were possible
> - Manage the openGL state in a more consistent way that now
> (currently a method never really knows in what will be the state of
> openGL when the method is called)
> - Allow a better mix between Qt drawing and native stellarium openGL drawing.
> - Have a clean and simple API hiding all optimizations details.
> Because the changes are pretty huge I started a new branch called
> stellarium-StelPainter. The branch currently doesn't compile and will
> probably not for a while :)
> The design is somewhat inspired from the Qt painting framework. The
> main changes are:
> - There is no more 1 instance of Projector used by all modules.
> Instead, each module create a new instance where needed. To make
> creation of many instances of Projector fast, the class was reduced to
> the minimum needed. I currently decided to use boost shared_ptr to
> avoid messing with dangling pointers. It may change though.
> - Only const instances of Projector are created, and they are fully
> - For painting, a new class called StelPainter has to be instantiated
> where it is needed. Only 1 instance of StelPainter can be used at a
> given time (thus making all its calls threadsafe).
> - A new rule in the code is that it is forbidden to make any openGL
> calls without an instance of StelPainter available. This should allow
> to use openGL in a thread-safe way as well. I hope to find a way to
> enforce this rule.
> Once the migration is done, there should be hopefully almost no
> performance impacts, and it will allow in the future to perform many
> optimizations, like the ones Johannes has been playing with in
> Comments are welcome, I will keep you updated on my progress.