[Kstars-devel] KStars vs Stellarium - Graphics

Jason Harris kstars at 30doradus.org
Sun Jun 8 21:59:29 CEST 2008


It's possible that it would be as easy as deriving SkyMap from
QGLWidget instead of QWidget.  However, openGL has been attempted
before for kstars, a long time ago.  OpenGL stores the items being
drawn on-screen in a buffer list, and internally takes care of all of
the screen and horizon clipping that we currently do manually.  As I
recall, the problem was that it's slow to modify this list of drawable
objects.  Since we want the stars to change apparent size as you zoom
in/out, we'd be essentially rebuilding the list of drawn objects
whenever the user zooms.

This is all based on my own memory of a very brief investigation of
KStars under openGL.  It's possible that QGLWidget solves these
problems.  It would be worth trying.

Jason


On Fri, Jun 6, 2008 at 12:42 PM, Akarsh Simha <akarshsimha at gmail.com> wrote:
> Hi James,
>
>>   Since QGLWidget is a subclass of QWidget, it is possible to
>>   reimplement its paintEvent() and use QPainter to draw on the device,
>>   just as you would with a QWidget. The only difference is that the
>>   painting operations will be accelerated in hardware if it is supported
>>   by your system's OpenGL drivers.
>
> Ok. So that is where the difference between GL and non GL rendering
> comes in! Thanks.
>
> Let us wait and see what Jason has to say about this.
>
> Regards
> Akarsh
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFISZM/kAo+aFFLL8MRArLyAKCFiJCS6siX+Vf+5NUeGdAl42xYlQCdFOof
> tUmPV1nwU2Ywo+Oazou8t8c=
> =yFAN
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel
>
>


More information about the Kstars-devel mailing list