Is OpenGL/GLUT right for me?

My applcation tracks vehicle movement in real time.

It seems to me the hard bit is - recover the scene at location “A” when the vehicle has moved to “B”. The porgram needs to find out all the objects or parts of the objects covered by the vehicle while it was at “A” and redraw them.

There is no real need to model the objects in the application in 3-D. I started looking for free 2-D library that can MANAGE the objects for me (ie. I don’t want to keep track the objects and their whereabouts). I have not found one yet.

Then I found OpenGL/GLUT. When I compiled planet.c from a tutorial. It looks good. It seems to me the objects were managed.
I am hoping that I can still model all my objects in 2-D and let OpenGL/GLUT to manage them.

Is OpenGL/GLUT suitable for my aplication? Or, is there a better way? I assume that drawing 2-D objects whould be much faster than 3-D.

Thanks.

With good 3D hardware there may not been much diffrence between 2D and 3D speed.

In some cases doing it in openGL would be easier then in just 2D from a programming stand point.

Originally posted by lfc:
[b]My applcation tracks vehicle movement in real time.

It seems to me the hard bit is - recover the scene at location “A” when the vehicle has moved to “B”. The porgram needs to find out all the objects or parts of the objects covered by the vehicle while it was at “A” and redraw them.

There is no real need to model the objects in the application in 3-D. I started looking for free 2-D library that can MANAGE the objects for me (ie. I don’t want to keep track the objects and their whereabouts). I have not found one yet.

Then I found OpenGL/GLUT. When I compiled planet.c from a tutorial. It looks good. It seems to me the objects were managed.
I am hoping that I can still model all my objects in 2-D and let OpenGL/GLUT to manage them.

Is OpenGL/GLUT suitable for my aplication? Or, is there a better way? I assume that drawing 2-D objects whould be much faster than 3-D.

Thanks.[/b]

About “object position management”: OpenGL manages object transformations etc for you, so all you have to do is basically to tell OpenGL where you want your object (e.g. using the glTranslate function).

You still need to have some sort of custom object representation though, where you keep track of where your object is located.

What you need to understand is that OpenGL does not have any “scene memory” (unlike a standard raytracer, for instance). You need to explicitly draw your scene with OpenGL each time you want to update the view/display, meaning that YOU are responsible for managing the objects etc of the scene. What OpenGL does for you is merely to transfrom your 3D/2D scene data into viewable 2D images on the screen - it doesn’t have any clue what it’s drawing.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.