KhronosGroup / OpenGL-Registry

OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
689 stars 275 forks source link

glIndexFuncEXT takes float parameter in extension and GLclampf in gl.xml #542

Closed NogginBops closed 2 years ago

NogginBops commented 2 years ago

In EXT_index_func.txt glIndexFuncEXT is defined as

void IndexFuncEXT (enum func, float ref)

while gl.xml specifies it as (with the second parameter as GLclampf)

<command>
    <proto>void <name>glIndexFuncEXT</name></proto>
    <param group="IndexFunctionEXT"><ptype>GLenum</ptype> <name>func</name></param>
    <param kind="ColorIndexValue"><ptype>GLclampf</ptype> <name>ref</name></param>
</command>

One of the two documents should be updated to contain the correct definition of the function.

NogginBops commented 2 years ago

I've now realized that it's GLclampf instead of GLfixed which means this isn't really an issue as the GLclampf is defined as float. I'm closing this as the GLclampf typedef probably didn't exist in the 1.1 spec on which the extension is written against.

If this is something that Khronos feels should done about this then feel free to reopen the issue.

Perksey commented 2 years ago

Isn't this fine given the differing purposes of the two documents? i.e. the extension specification serves to be an authoritative source for the implementation of OpenGL (and illustrative of the API), whereas the XML/C headers are meant to be the authoritative source for the actual API. For instance, `GLclampf is a typedef for a float but the specification document is abstracted away from the granular typedefs that you'd find in C. I feel like as long as the specification is illustrative of what the actual ABI (i.e. it's not horribly wrong) is it's not too much of an issue.

EDIT: issue has been closed :)