Qt-interest Archive, August 2006
Qt4 and OpenGL newbie: advice on scene graph?
Message 1 in thread
I'm a newbie starting out on OpenGL who was told a while ago that when
writing an application which does OpenGL for graphics, the use of a scene
graph would help a lot.
So, I'm a total newbie on this subject. I don't know if using a scene graph
with Qt4 is a reasonable thing to do, what scene graph library to use or
even if using a scene graph is even a good idea.
So, can anyone help me out? Is using a scene graph library a good idea? If
so, what library should I use?
Best regards and thanks in advance
Rui Maciel
--
[ signature omitted ]
Message 2 in thread
> I don't know if using a scene graph
> with Qt4 is a reasonable thing to do,
A scene graph facility will plug into Qt because all Qt does is give you a
place to render your GL, but the scene graph gives you a way to organize
your GL into objects. So they're quite modular.
> what scene graph library to use or
> even if using a scene graph is even a good idea.
I had very simple needs so I wrote my own scene graph library. It isn't
very fancy and doesn't do much, so I wouldn't pass it on to anyone else. :)
But it did help me a LOT with the project I was working on. I recommend
this approach to OpenGL, because it's essentially the OO solution. If you
don't use a scene graph, you're probably not doing it the OO way, which
usually means less organized.
> So, can anyone help me out? Is using a scene graph library a good idea? If
> so, what library should I use?
This one works with Qt and looks impressive:
http://www.coin3d.org/
I haven't tried it.
Nathan
--
[ signature omitted ]
Message 3 in thread
Rui Maciel wrote:
> I'm a newbie starting out on OpenGL who was told a while ago that when
> writing an application which does OpenGL for graphics, the use of a scene
> graph would help a lot.
>
> So, I'm a total newbie on this subject. I don't know if using a scene graph
> with Qt4 is a reasonable thing to do, what scene graph library to use or
> even if using a scene graph is even a good idea.
>
> So, can anyone help me out? Is using a scene graph library a good idea? If
> so, what library should I use?
>
>
> Best regards and thanks in advance
> Rui Maciel
>
One possibility for a scene graph library is Coin3D www.coin3d.org. The
library is actually called OpenInventor and is a C++ wrapper around
OpenGL developed by SGI ages ago and taken up by TGS and Systems in
Motion () and others.
The Coin3D folks also have a gui binding for Qt called SoQt. I've used
Coin + SoQt + Qt under Linux, Mac, and Win both Qt-3 and Qt-4
no problem.
Good Luck,
Ed
--
[ signature omitted ]
Message 4 in thread
Ed Smith-Rowland schrieb:
> Rui Maciel wrote:
>> I'm a newbie starting out on OpenGL ...
>> ...
>> So, can anyone help me out? Is using a scene graph library a good
>> idea?
A good idea would be to start with a trivial "My first rotating cube"
OpenGL example before jumping into scene graphs and more advanced 3D
topics - note that this has nothing to do with Qt, Qt "just" provides a
nice rendering context (the QGLWidget). All the 3D stuff is raw OpenGL
or ...
> One possibility for a scene graph library is Coin3D www.coin3d.org.
... the mentioned Coin3D library which does some abstraction above
OpenGL (and hence might indeed help), but before learning yet another
library I would go for OpenGL basics first.
Btw Qt itself has some nice OpenGL examples, also the mentioned
"rotating cube" :) Also there's a tutorial called Nene's OpenGL tutorial
(or similar, check google)
A good book about OpenGL also helps a lot (and/or 3D graphics in general ;)
Cheers, Oliver
--
[ signature omitted ]
Message 5 in thread
> Btw Qt itself has some nice OpenGL examples, also the mentioned
> "rotating cube" :) Also there's a tutorial called Nene's OpenGL tutorial
> (or similar, check google)
Don't Google for Nene. Use NeHe instead. :)
http://nehe.gamedev.net/
Nathan
--
[ signature omitted ]
Message 6 in thread
Till Oliver Knoll wrote:
> A good idea would be to start with a trivial "My first rotating cube"
> OpenGL example before jumping into scene graphs and more advanced 3D
> topics - note that this has nothing to do with Qt, Qt "just" provides a
> nice rendering context (the QGLWidget). All the 3D stuff is raw OpenGL
> or ...
Thanks for suggesting that. It is indeed the wisest thing to do. Yet, when I
stated that I was an OpenGL newbie, I was overstating it a bit. The thing
is, I have some experience with the basics of OpenGL (did the NeHe run when
there were less than 15 tutorials in the site) and wrote a couple of test
apps that ran on windows). The problem is that that happened a couple of
years ago, when I was very young and OpenGL 2.0 was on the verge of being
released. Now some of the subject is just a blur which is slowly sharpening
up.
Nonetheless, I am perfectly new to the OpenGL on Qt deal and until recently
to me a scene graph was nothing more than a nifty techie term I heard
somewhere.
Best regards
Rui Maciel
--
[ signature omitted ]
Message 7 in thread
Ed Smith-Rowland wrote:
> One possibility for a scene graph library is Coin3D www.coin3d.org. ÂThe
> library is actually called OpenInventor and is a C++ wrapper around
> OpenGL developed by SGI ages ago and taken up by TGS and Systems in
> Motion () and others.
>
> The Coin3D folks also have a gui binding for Qt called SoQt. ÂI've used
> Coin + SoQt + Qt under Linux, Mac, and Win both Qt-3 and Qt-4
> no problem.
Sounds quite nice. I can see that a Coin3D package is available on my
apt-get repositories but unfortunately the SoQt package is still compiled
for Qt3. At a first glance by an untrained eye it seems that what the SoQt
library does is offer another list of interfaces that serve as an
abstraction layer for Qt. Is it true? Is it possible to use Coin3D without
the SoQt bindings? Moreover, is it possible to use other scenegraph
libraries with Qt (OpenSceneGraph, OpenSG, etc...) without having any Qt
bindings for those libraries? Going back to SoQt, what are the pros and
cons of using and not using it with Coin3D?
Many thanks for your help and best regards
Rui Maciel
--
[ signature omitted ]