Inertia's picture

GetTextureParameter Enum unnecessary duplicates

Project:The Open Toolkit library
Version:1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:won't fix
Description

IIRC it was agreed that Enums should not contain any duplicate tokens from extensions that were promoted (with the All enum being the exception to the rule). This was primarily to avoid confusing the users whether the tokens are in fact the same numbers or different ones.

TextureWrapR = ((int)0x8072),
TextureWrapRExt = ((int)0x8072),

TextureDepth = ((int)0x8071),
TextureDepthExt = ((int)0x8071),


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Inertia's picture

#1

This is also true for the enum TextureParameterName.

TextureWrapR = ((int)0x8072),
TextureWrapRExt = ((int)0x8072),

GenerateMipmap = ((int)0x8191),
GenerateMipmapSgis = ((int)0x8191),

----

This is bad, but apparently an error from the number registry and not ours.

ShadowAmbientSgix = ((int)0x80BF),
TextureCompareFailValue = ((int)0x80BF),

Inertia's picture

#2

Priority:normal» critical

Upped priority, this should either be done as soon as possible, or the request denied. (it will cause build errors, every time an Ext is promoted to Arb or Core)

Also true for enum ShaderType:

GeometryShader = ((int)0x8DD9),
GeometryShaderExt = ((int)0x8DD9),

the Fiddler's picture

#3

Status:open» won't fix

The generator has the ability to drop duplicate tokens but this won't work in the general case, as it will introduce unnecessary breakage at every future spec update.