KhronosGroup / OpenGL-Refpages

OpenGL and OpenGL ES reference page sources, and generated HTML used as backing store for khronos.org
435 stars 137 forks source link

es3 and gl4 glGenVertexArrays man page has weird output and odd indentation #34

Closed wirecat closed 2 years ago

wirecat commented 6 years ago

Looks like the man page generation for glGenVertexArrays has something goofy going on. Attached is the output.

I believe this is only affecting es3, gl4 and any version where the xml docs are using xml namespaces.

Tested using: OS: Arch Linux (up to date) Package: opengl-man-pages Package Version: 20170404-1

If someone pointed me in the right direction I would work on this. I've been looking into it already, but am having a hard time getting started.

glGenVertexArrays_ManOutput.txt

e: Clarified that this is only for man pages on arch using a specific package. e2: Clarified which version are effected.

wirecat commented 6 years ago

I think I have a fix in mind and will be trying it out this week. It all has to do with leading whitespace getting generated in the gl4 generation for man pages. For some reason, xsltproc really doesn't like the xmlns that the gl4 docs have. This affects more than just glGenVertexArrays, but it was only visible there to me because the arch package is compiled in a weird way.

ahuillet commented 6 years ago

I see the same problem on Arch with a various GL functions - GenVertexArrays, MultiDrawElementsIndirect, and others. @wirecat, any thoughts for a possible fix?

wirecat commented 6 years ago

@ahuillet Sorry for the delay. I do have some possible fixes... but I'm not sure I found one I like yet.

This could be fixed by updating the Makefile to contain a ManPage option that generates the manpages and then trims all leading whitespace in the the generated pages. This is the simplest solution I have found and would fix the issue.

I also need to have downstream dependents like Arch use the updated make file instead of rolling their own. I do have a bug logged against the Arch repo for these man page docs: https://bugs.archlinux.org/task/57655?project=1&string=opengl-man-pages

I feel like the actual bug is in xsltproc or in how this repo has formatted its inputs, but I haven't started barking up that tree yet.