Originally posted by V-man:
HANDLE vs ID :
The spec gives some hints about design dicisions. The case for app assigned ID versus GL assigned handle for the shading spec. Read it if you wish.
It’s not consistent with old GL, but ever since I started using GL, I wondered why the dicision was made to allow users to assign any ID we like to display lists and textures.
Because you can only create OpenGL object ids in the thread that has the active OpenGL context. If you are in a multi-threaded environment, only one thread can have the context bound, and that’s usually not the thread that the application works in. For these situations it’s much nicer to be able to manage the id handling totally separate from OpenGL in your own manager. Been there, doing that, pulling my hair about how to support the new model (not really, but it is more painful than the old way).
Probably some other systems have unique object ids anyway, and could use those as OpenGL ids, or id numbers could contain meaning or be derivable from other information about the object. Not a big deal, but a lot of OpenGL has been designed to make the developer’s life easier. And it shows, OpenGL (core) really is very elegant, simple and flexible.
That also goes for many things that apparently a bunch of people consider useless, like immediate mode. The great thing about immediate mode is that it allows you to totally freely define where your data is coming from. Whatever format you store in the non-graphics part of your software, you can directly feed it to OpenGL. You can also do crazy stuff like multi-indexing, which is not possible without copying in VertexArrays and related variants.
Yes, you can implement all the different geometry specification methods using each other. But going from immediate mode to VBO can be a lot of work for the application programmer, of which we (hopefully) have much more than driver developers. So from an economic point of view it’s better for the driver developers to spend time on this. I’m aware of the fact that driver developer time is a scarce resource, but if cass says supporting (at least most) of the old extensions is not a big deal, why am I to argue? Not to talk about backwards compatibility and software that was written 10 years ago and still works…
The success of OpenGL is partially due to its flexibility and simplicity, which lets people with whatever background use it easily for whatever purpose. Let’s not throw that away.
Just my .02$
Dirk