You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
How to contribute to the OpenTK 5.0 Bindings Generator
To help with XML issues
There are mismatches between the XML version of the spec and the official documentation.
These cause the bindings generator to generate incorrect values or less convenient types than we expect.
These issues mostly are missing metadata about how parameters and information relate to one another.
To improve this, we need to fix the upstream XML version of the spec.
Fixing XML Guide:
Using the example function: glNamedFramebufferDrawBuffers
1) Look up the OpenGL function signature in the reference documentation.
framebuffer
Specifies the name of the framebuffer object for glNamedFramebufferDrawBuffers.
n
Specifies the number of buffers in bufs.
bufs
Points to an array of symbolic constants specifying the buffers into which fragment colors or data values will be written.
2) Look up the OpenGL Function signature in the Khronos XML specification:
This is ALMOST correct, but there is no information to indicate that n corresponds to the length of the bufs array.
3) Add missing metadata:
To fix this, we need to add a len property to the bufs parameter. This tells us that the n property corresponds
to the length of the buffer pass in. This change is on the last <param> line.
Tasks list
For future updates?
Source Location
The source code for the new generator is currently located at:
https://github.com/frederikja163/opentk/tree/generator
How to contribute to the OpenTK 5.0 Bindings Generator
To help with XML issues
There are mismatches between the XML version of the spec and the official documentation.
These cause the bindings generator to generate incorrect values or less convenient types than we expect.
These issues mostly are missing metadata about how parameters and information relate to one another.
To improve this, we need to fix the upstream XML version of the spec.
Fixing XML Guide:
Using the example function: glNamedFramebufferDrawBuffers
1) Look up the OpenGL function signature in the reference documentation.
The parameters section contains the information we're concerned with.
For example, see: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glDrawBuffers.xhtml
Pay attention to the parameter listing:
2) Look up the OpenGL Function signature in the Khronos XML specification:
This is available here: https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml
It's a huge file, so download it into a text editor and use Ctrl+F (Search) to navigate to the function you want.
We're concerned mostly with the
<command>
section.at the time of writing, this looks something like this:
This is ALMOST correct, but there is no information to indicate that
n
corresponds to the length of thebufs
array.3) Add missing metadata:
To fix this, we need to add a
len
property to thebufs
parameter. This tells us that then
property correspondsto the length of the buffer pass in. This change is on the last
<param>
line.4) Now, make a PR to the Khronos Repo with your changes.
This repo is available here: https://github.com/KhronosGroup/OpenGL-Registry
To help with code issues:
TODO
FAQ:
Is there any documentation on the XML tags?
Yes there is. A full PDF is available here listing all of the properties and what they mean:
https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/readme.pdf
The text was updated successfully, but these errors were encountered: