KhronosGroup / OpenGL-API

OpenGL and OpenGL ES API Issue Tracker
34 stars 5 forks source link

Mismatch between command argument names and documentation argument names #4

Closed luca-piccioni closed 7 years ago

luca-piccioni commented 7 years ago

My OpenGL API bindings generator tries to match available documentation with the current command definition, in order to document the commands properly. Indeed thousands of commands are perfectly integrated with the OpenGL documentation, but few commands have a mismatch on arguments names with respect the ones found in the documentation.

Here is the current list of the arguments with missing documentation (because name mismatch):

Missing documentation: Gl.CompressedTexSubImage3D.zoffset
Missing documentation: Gl.CompressedTexSubImage3D.zoffset
Missing documentation: Gl.GetCompressedTexImage.img
Missing documentation: Gl.GetCompressedTexImage.img
Missing documentation: Gl.CreateShader.type
Missing documentation: Gl.BindFragDataLocation.color
Missing documentation: Gl.GenFramebuffers.framebuffers
Missing documentation: Gl.FramebufferTexture3D.zoffset
Missing documentation: Gl.BlitFramebuffer.srcY0
Missing documentation: Gl.BlitFramebuffer.srcX1
Missing documentation: Gl.BlitFramebuffer.srcY1
Missing documentation: Gl.BlitFramebuffer.dstY0
Missing documentation: Gl.BlitFramebuffer.dstX1
Missing documentation: Gl.BlitFramebuffer.dstY1
Missing documentation: Gl.TexImage3DMultisample.depth
Missing documentation: Gl.IsSampler.sampler
Missing documentation: Gl.GetUniformSubroutine.params
Missing documentation: Gl.DepthRange.n
Missing documentation: Gl.DepthRange.f
Missing documentation: Gl.ClearDepth.d
Missing documentation: Gl.DepthRangeIndexed.n
Missing documentation: Gl.DepthRangeIndexed.f
Missing documentation: Gl.CopyImageSubData.dstLevel
Missing documentation: Gl.GetProgramResource.index
Missing documentation: Gl.GetProgramResource.props
Missing documentation: Gl.GetProgramResource.length
Missing documentation: Gl.GetProgramResource.params
Missing documentation: Gl.DebugMessageInsert.buf
Missing documentation: Gl.BindBuffersBase.first
Missing documentation: Gl.BindBuffersRange.first
Missing documentation: Gl.BindBuffersRange.offsets
Missing documentation: Gl.BindBuffersRange.sizes
Missing documentation: Gl.BindVertexBuffers.strides
Missing documentation: Gl.BlitNamedFramebuffer.srcY0
Missing documentation: Gl.BlitNamedFramebuffer.srcX1
Missing documentation: Gl.BlitNamedFramebuffer.srcY1
Missing documentation: Gl.BlitNamedFramebuffer.dstY0
Missing documentation: Gl.BlitNamedFramebuffer.dstX1
Missing documentation: Gl.BlitNamedFramebuffer.dstY1
Missing documentation: Gl.GetNamedFramebufferParameter.param
Missing documentation: Gl.CompressedTextureSubImage3D.zoffset
Missing documentation: Gl.CompressedTextureSubImage3D.zoffset
Missing documentation: Gl.VertexArrayVertexBuffers.strides
Missing documentation: Gl.GetnCompressedTexImage.lod
Missing documentation: Gl.GetnCompressedTexImage.lod

Additionally the same problem is found in glColorMaski, glDepthRange, glDraw*, and others. Here is the most relevant section of the configuration of my code generator:

<!-- Argument renaming for better documentation -->

<command name="^glColorMaski$">
    <param id="index"><rename>buf</rename></param>
    <param id="r"><rename>red</rename></param>
    <param id="g"><rename>green</rename></param>
    <param id="b"><rename>blue</rename></param>
    <param id="a"><rename>alpha</rename></param>
</command>

<command name="^glDepthRange$">
    <param id="near"><rename>nearVal</rename></param>
    <param id="far"><rename>farVal</rename></param>
</command>

<command name="^glDraw(Arrays|Elements)Instanced(BaseVertex|BaseInstance|BaseVertexBaseInstance)?$">
    <param id="instancecount"><rename>primcount</rename></param>
</command>

<command name="^glDrawTransformFeedback(Stream)?Instanced$">
    <param id="instancecount"><rename>primcount</rename></param>
</command>

<command name="^gl(Enable|Disable|IsEnabled)i$">
    <param id="target"><rename>cap</rename></param>
</command>

<command name="^glFramebufferTexture3D$">
    <param id="zoffset"><rename>layer</rename></param>
</command>

<command name="^glGet(Program|Shader)InfoLog$">
    <param id="bufSize"><rename>maxLength</rename></param>
</command>

<command name="^glGet(Named)?BufferParameter(iv|i64v)$">
    <param id="pname"><rename>value</rename></param>
    <param id="params"><rename>data</rename></param>
</command>

<command name="^gl(NamedFramebuffer)?ReadBuffer$">
    <param id="src"><rename>mode</rename></param>
</command>

<command name="^glProvokingVertex$">
    <param id="mode"><rename>provokeMode</rename></param>
</command>

<command name="^gl(Read(n)?Pixels|TexImage3D)$">
    <param id="pixels"><rename>data</rename></param>
</command>

<command name="^glStencilOp$">
    <param id="fail"><rename>sfail</rename></param>
    <param id="zfail"><rename>dpfail</rename></param>
    <param id="zpass"><rename>dppass</rename></param>
</command>