[HOpenGL] OpenGLRaw naming convention

L Corbijn aspergesoepje at gmail.com
Mon Jan 16 12:19:41 CET 2012


Hello HOpenGL,

While working on my OpenGLRaw-generator which is getting quite good
(current OpenGL compiles with minor changes) I've come to wonder/worry
about the current naming convention of Raw.

The current naming scheme of OpenGLRaw can best be described as, try
to remove the vendor names (NV, ARB, etc. suffixes) unless it will
result in a conflict. To give two examples, MultiTexCoord2dARB ->
MultiTexCoord2d, as there is none defined otherwise, while
glPrimitiveRestartIndexNV keeps it's name as glPrimitiveRestartIndex
is a different function.

When generating code I've come across a few nasty disadvantages with
no obvious solution in this scheme.
1. What to do when two or more vendors have the same enum/function
which should be promoted to the one without vendor name.
2. The mixing of functions with and without vendor name, e.g.
glPrimitiveRestart, glPrimitiveRestartIndexNV from NVidia's
PrimitiveRestart extension.
3. Breaking changes, what if a new extension or even a new OpenGL
version adds a different enum/function with the same name (without
vender part), as the striped name collides the extension must be
re-added leading to some code breaking (maybe even silently!).
The only advantage I see is that two enums/functions who differ in
name also differ in value/implementation.

Therefore I would like to know what people think about the current
naming convention, and whether it would be a major issue to change it
(probably to keeping the vendor names everywhere).

Greetings,

Lars



More information about the HOpenGL mailing list