[Kstars-devel] Problem with coordinate grid at high zoom
Torsten Rahn
torsten.rahn at credativ.de
Tue Sep 11 12:00:42 CEST 2007
> The problem really is in the QT QPainter::drawLine() code.
>
> Contrary to my earlier assumptions, it is incredibly slow when it has
> to clip lines to the borders of the window. By simply increasing the
> point density of the coordinate grid by a factor of 4 I was able to
> reduce/eliminate the problem at the zoom level I was working at but
> (of course) it came back when I increased the zoom level.
Are you sure about this? Maybe it's just related to the drawing done
differently if it exceeds the memory of the graphics card. Or it's related to
rasterization time increasing with O(n log(n)).
http://trolltech.com/company/newsroom/events/allevents/devroadshow/presentations/qtrs06-effgraphicsprogramming
Page 30.
Anyways, I clip all QPainter::drawPolygon calls using my own QPainter class in
Marble (it's called "ClipPainter" there and still has some issues though).
> would be a bit of a mess if we needed to interleave the screen clipping
> with the horizon clipping. But we only need to do the screen clipping
Well, we also do that in Marble already.
BTW: Do you have any "before"-"after" figures available concerning your
spatial index introduction in KStars? I'd be interested in introducing a
spatial index for Marble as well, where/if it makes sense (at least for
storing location data on the hard disk to save space for the marble
distribution package).
Torsten
--
Torsten Rahn
Tel.: 0 21 61 - 46 43 - 192
credativ GmbH, HRB Mönchengladbach 12080
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz
More information about the Kstars-devel
mailing list