OpenGL Scene Management

A bit off topic, i know, but i’ve run out of good answers everywhere else and google ain’t exactly helping a lot.

I’m trying to find a good system to store my vertices and polygonal data etc., that would make my life easier if i want to implement different techniques such as sorting front-to back, implementing QuadTree, Octrees or even BSP’s. Currently i’m just creating a bunch of vertex-arrays and stuff and it’s getting quite a bit messy, specially with all the VAR code and texture loading here and there

I’d have thought that good scene management data structures would help considerably for this but i’m not exactly finding a lot of information in this subject.

If anyone has any links or tips, and even good book hints that would be greatly appreciated.

Thanks in advance!

Store everything in a scenegraph - this is the most useful state to have everything in at the start. From there you can create bsp’s for static branches of the scenegraph, then delete those branches.
It will also help you to create your own high level scenegraph file format - simple text format, for specifying test scenes etc.

MyTransformNode “TheWorld”
translate 300,200,100
rotate 90,0,0

MyGeometryNode “TheCar”
static false
filename “car.3ds”

MyGeometryNode “TheLandscape”
static true // will get converted to bsp
filename “landscape.3ds”

That kind of thing.

hm… so you mean i should create a tree for my objects… for example:

| |-Landscape
| |-Trees
| |-Houses

I’m not sure i’ve seen the term scenegraph before so please correct me if i’m wrong.

[This message has been edited by Stebet (edited 05-29-2002).]

[This message has been edited by Stebet (edited 05-29-2002).]

Yes, that’s right. A tree.
Look up “scenegraph” in google.
A good example is “performer”.

Thanks a lot… finally some answers to work with

Look for openscenegraph here on, they have had several updates, I think now including OpenAL for audio, and model loading, etc. It is still in developement, but it beats writing your own, unless you really WANT to write your own.

Well… actually i want to write my own scenegraph engine (or something similar) as doing things myself for the first time usually helps me learn these concepts a lot better, so if you people have any links for me regarding implementations that would be nice.

Thanks again