marciano wrote:
The advantage of having the enums wrapped in a struct is that you can easily see what enum values are available for a given parameter.
Yes, that is one of the annoyances of the OpenGL approach. Autocompletion for such constants is not very useful, and once you have similar names like GL_TEXTURE and GL_TEXTURE_2D, you really need documentation opened at all times (which I do anyway for various reasons -- but that's just me).
Anyway, I don't insist on the proposed way. If there's any other way to shorten the names, then I'm all for it.
Expandable wrote:
Enums in OpenGL are just #defines, aren't they?
Yeah, that part should not be copied; for constants enums look better than defines.
Expandable wrote:
Anyway, why not just use enums the standard C++-way?
That actually was my first impulse also, but unfortunately there are conflicts: MeshNodeParams::MaterialRes is 300, while LightNodeParams::MaterialRes is 500, so you can't just use MaterialRes everywhere, you have to use the prefix.