Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Show COMPSIZE() hints in the documentation tooltips #15

thefiddler opened this Issue · 3 comments

2 participants


OpenGL functions with array parameters, such as DrawRangeElements, are decorated with COMPSIZE() hints that describe how the array size is calculated. For instance:

            <proto>void <name>glDrawRangeElements</name></proto>
            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
            <param><ptype>GLuint</ptype> <name>start</name></param>
            <param><ptype>GLuint</ptype> <name>end</name></param>
            <param><ptype>GLsizei</ptype> <name>count</name></param>
            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>

The last parameter has len="COMPSIZE(count,type)", which means that its length is determined by the count and type parameters (and not from mode as one might expect.)

It would be nice to display these hints in our documentation tooltips.

This requires the following changes:

  • Generator.Convert.GLXmlParser: read len attributes from gl.xml and store them in our signatures.xml
  • Generator.Bind.Parameter: add ComputeSize property
  • Generator.Bind.XmlSpecReader: set ComputeSize properties for relevant parameters
  • Generator.Bind.CSharpSpecWriter: generate doc comments for ComputeSize properties

The last step is the most complicated one, because doc comments do not currently pass through the data model, but are generated directly from the xml manpages of OpenGL via xslt.


This looks nice, PR please?

@thefiddler thefiddler added this to the 1.1.1 milestone

Many thanks, merged!

@thefiddler thefiddler closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.