Khronos Public Bugzilla
Bug 465 - gl.spec entry for ShaderSource is incorrect
gl.spec entry for ShaderSource is incorrect
Status: RESOLVED WONTFIX
Product: OpenGL
Classification: Unclassified
Component: Registry
4.1
All All
: P3 normal
: ---
Assigned To: Jon Leech
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-22 03:38 PDT by Stephan Houben
Modified: 2013-06-13 03:51 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Houben 2011-04-22 03:38:59 PDT
gl.spec contains this for ShaderSource

ShaderSource(shader, count, string, length)
        return          void
        param           shader          UInt32 in value
        param           count           SizeI in value
        param           string          CharPointer in array [count]
        param           length          Int32 in array [1]

However, according to the docs:
"If length is a value other than NULL, it points to an array containing
a string length for each of the corresponding elements of
string."

So the array length of [1] is wrong, it should be [count]:

        param           length          Int32 in array [count]
Comment 1 Jon Leech 2013-06-13 03:51:49 PDT
Khronos has moved to a new XML API Registry and headers generated
from that; see

http://www.opengl.org/registry/#specfiles
https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/

We don't plan to maintain the old .spec files going forward and this
problem can't fixed in the XML because XML doesn't include this
information - it simply uses the C prototype for argument types instead
of the language-independent type syntax in .spec. While we could add
array length information to the XML files, and I'm open to discussing
it if this is something you require and want to migrate to using the
XML files, the existing .spec array length
information is often inaccurate or vague (describing array lengths
as some unknown function of other parameters) and this isn't a simple
thing to actually get right for the entire registry.