the Fiddler's picture

Remove duplicate tokens in the generated bindings

Project:The Open Toolkit library
Version:0.9.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Many GL enums contain duplicate tokens, for example:

  • Texture3D and Texture3DExt
  • TextureRectangleArb and TextureRectangleNv

When those tokens are equal (i.e. (Texture3D == Texture3DExt) evaluates to true), it would make sense to remove the non-core ones. In the above examples, we should keep Texture3D and TextureRectangleArb and remove Texture3DExt and TextureRectangleNv.

This can be done by the binding generator (Bind) and should use the following rules for detecting which tokens to keep:

  1. Core tokens should always be kept.
  2. Arb tokens should be removed iff an equivalent core token exists in the same enum.
  3. Ext tokens should be removed iff an equivalent core or arb token exists in the same enum.
  4. Vendor specific tokens (nv, ati, mesa, etc) should be removed iff an equivalent core, arb or ext token exists in the same enum.
  5. No token should be removed from the "All" enum.

Comments

Comment viewing options

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

#1

Version:0.9.x-dev» 0.9.4
Status:open» closed

Implemented in 0.9.4, but disabled, as it will break backwards-compatibility every time the OpenGL spec is updated.

It will be useful if post-3.0 OpenGL profiles are implemented.