views:

992

answers:

4

I am new to OpenGL.

Wondering if there is any good Scenegraph API/framework for OpenGL.

At the moment I am using glut with a custom node based solution: I am setting children and siblings for each node the calling a traverse function.

I'd like a more flexible solution when it comes to managing dynamic elements in the scene.

+3  A: 

SDL is a bit more up to date than glut, but you are on the right track with rolling your own graph structure to manage scenery. There are plenty of frameworks available. OpenSceneGraph, for example, has been around for quite awhile now. OGRE has a large following as well. However, it is not a strictly OpenGL library as DirectX and software renderers are also available.

You may want to look into related topics like binary space partitioning, quadtrees/octrees and kd-trees.

Judge Maygarden
+2  A: 

I agree that openscenegraph is a great scenegraph. It is written i C++ and has bindings to some other languages, but not for .NET as far as I know. We were in the situation to use something more than plain old opengl and were looking at managed directx, xna, wpf and opengl. We chose to write our own scenegraph based on Tao.OpenGL as opengl.

You can accomplish dynamic objects by having an update phases before the culling and rendering stages. If you do multi-threaded you need to be careful with the update stage.

Kalle
+1  A: 

There are plenty of libraries treating this topic. Here some of my favorites:

  • VTK - extremely suitable and open source
  • Coin3D - very good commercial scene graph
  • OpenSG - just for completeness :-)
mem64k
+1  A: 

I second (third?) the use of OpenSceneGraph. It is robust and cross platform, and integrates well with Qt (our application runs on MacOS, Windows, and Linux using OpenSceneGraph and Qt together). The documentation may not be as polished as a commercial option, but there's a book you can buy (and a free Quick Start Guide) that really helps.

Simeon Fitch