Qt-interest Archive, May 2008
Glut and QGLWidget comparing
Message 1 in thread
Dear friends.
If you remember, i have posted a question about using Glut in Qt widgets.
Now i want to focus on this topic from the viewpoint of "comparing these
toolkits".
First question: Am i forced to learn new graphical concepts and
functions to use Qt instead of Glut? I know that i have to learn new
things about event handling and main loop, but i want to know that does
exist obscene differences in basic concepts? i.e Is Qt developers remain
faithful alongside of OpenGL structure, in future?
Second question: Please compare them from the viewpoint of
performance(Please avoid from prejudice).
Third question: Which one is more stable? Is the continuation of
development and support from Trolltech is trustier than Glut? (It is
very important and effective on decision).
Forth question: Which one is more expanded and wraps all of OpenGL
capabilities and specialties?
---
Thanks for your helps, I desire your health
--
[ signature omitted ]
Message 2 in thread
Hi,
Let me *try* to give you a good answer, although I am not very knowledgeble
about GLUT.
<aliasghar.toraby@xxxxxxxxx> wrote in message
news:48232528.9010308@xxxxxxxxxxxx
> First question: Am i forced to learn new graphical concepts and functions
> to use Qt instead of Glut? I know that i have to learn new things about
> event handling and main loop, but i want to know that does exist obscene
> differences in basic concepts?
Yes, you will need to learn new stuff. A very central Qt thing is the
signal/slot mechanism. This is unlike anything you will find in GLUT. You
should realize that Qt has a much, much broader scope than GLUT. AFAIK, GLUT
is mostly a wrapper around OpenGL and totally geared towards building OpenGL
applications. To do that, it provides some basic UI stuff like windows,
mouse and keyboard handlers, etc. Qt on the other hand is a programming
toolkit. It has an extensive UI library, but it also has API's for a range
of other things, including networking, XML, file handling, sound and video,
etc. Qt can use OpenGL in two ways: One the one hand, it provides a means to
integrate OpenGL windows into the UI, much like GLUT does. This is a fairly
simple widget. On the other hand, Qt can use a number of drawing backends,
including OpenGL. So, it can render a lot of it's drawing through OpenGL, if
you want.
I hope you can appreciate the difference.
> i.e Is Qt developers remain faithful alongside of OpenGL structure, in
> future?
I don't know. As Qt does not try to really wrap all that much of openGL, I
think there is not much "staying alongside" to do.
> Second question: Please compare them from the viewpoint of
> performance(Please avoid from prejudice).
You don't know untill you test. You can do that yourself. Qt is quite fast,
but due to it's nature of being capable of so much more than OpenGL, it may
not be the fastest solution for a OpenGL only application.
> Third question: Which one is more stable? Is the continuation of
> development and support from Trolltech is trustier than Glut? (It is very
> important and effective on decision).
I think you can be sure that Qt will be supported and developped further.
Trolltech has just been aquired by Nokia, by the way. I don't know if you
trust large corporations more or less than smaller ones, but it may
influence your view on this either way. So far, I think support from
Trolltech is excellent, but it is always hard to look into the future.
> Forth question: Which one is more expanded and wraps all of OpenGL
> capabilities and specialties?
In terms of wrapping OpenGL, my guess would be GLUT is going much further.
Qt is way more expanded in other areas though. What Qt does in terms of
OpenGL mapping is the ability to use standard Qt drawing on OpenGL widgets.
I guess in the end, it really matters what you are trying to achieve. If
your application is really focussed around your OpenGL stuff, and needs
little else with respect to UI, networking, etc., I think GLUT is not a bad
choice. If the UI around your OpenGL part is important, or if you need to
integrate things like networking or IPC, I think you should give Qt a shot.
HTH,
André
--
[ signature omitted ]