After lots of frustration about correctly interpreting the metadata in gl.xml, here is the previous output but now with completely automatically resolved GLenum names instead of their integer values!
Thanks to @Spasi for working on the LWJGL 3 side of this by supplying @NativeType annotations on methods and method parameters in the LWJGL 3 sources/classfiles, which allowed to match the LWJGL 3 GL API with the gl.xml metadata in order to identify GLenums and decode them!
And the best thing is: Resolving bitmasks, called GLbitfield in GL, works too (see the glClear() output not shown in the previous output).
Also new and not shown above is tracing of the GLSL code uploaded via the various GL API functions such as glShaderSource() and glCreateShaderProgramv():
[trace] glfwInit() = true
[trace] glfwDefaultWindowHints()
[trace] glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE)
[trace] glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE)
[trace] glfwWindowHint(GLFW_SAMPLES, 4)
[trace] glfwGetPrimaryMonitor() = 5149680L
[trace] glfwGetVideoMode(5149680L) = GLFWVidMode pointer [0x4E9414]
[trace] glfwCreateWindow(100, 100, "Little Space Shooter Game", 0L, 0L) = 5186608L
[trace] glfwCreateStandardCursor(GLFW_CROSSHAIR_CURSOR) = 854237072L
[trace] glfwSetCursor(5186608L, 854237072L)
[trace] glfwSetFramebufferSizeCallback(5186608L, pointer [0x1FC0000]) = null
[trace] glfwSetWindowSizeCallback(5186608L, pointer [0x2550000]) = null
[trace] glfwSetKeyCallback(5186608L, pointer [0x2930000]) = null
[trace] glfwSetCursorPosCallback(5186608L, pointer [0x2940000]) = null
[trace] glfwSetMouseButtonCallback(5186608L, pointer [0x2950000]) = null
[trace][1] glfwMakeContextCurrent(5186608L)
[trace][1] glfwSwapInterval(0)
[trace][1] glfwShowWindow(5186608L)
[trace][1] nglfwGetFramebufferSize(5186608L, 695713168L, 695713172L)
[info ][1] Initialized OpenGL context [1] for GLFW window [5186608L]
[trace][1] createCapabilities() = org.lwjgl.opengl.GLCapabilities@3581c5f3
[trace][1] glGenTextures() = 1
[trace][1] glBindTexture(GL_TEXTURE_CUBE_MAP, 1)
[trace][1] glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, 9729)
[trace][1] glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, 9987)
[trace][1] glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_GENERATE_MIPMAP, 1)
[trace][1] glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGB8, 2048, 2048, 0, GL_RGB, GL_UNSIGNED_BYTE, java.nio.DirectByteBuffer[pos=0 lim=12582912 cap=12582912])
[trace][1] glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGB8, 2048, 2048, 0, GL_RGB, GL_UNSIGNED_BYTE, java.nio.DirectByteBuffer[pos=0 lim=12582912 cap=12582912])
[trace][1] glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGB8, 2048, 2048, 0, GL_RGB, GL_UNSIGNED_BYTE, java.nio.DirectByteBuffer[pos=0 lim=12582912 cap=12582912])
[trace][1] glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGB8, 2048, 2048, 0, GL_RGB, GL_UNSIGNED_BYTE, java.nio.DirectByteBuffer[pos=0 lim=12582912 cap=12582912])
[trace][1] glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGB8, 2048, 2048, 0, GL_RGB, GL_UNSIGNED_BYTE, java.nio.DirectByteBuffer[pos=0 lim=12582912 cap=12582912])
[trace][1] glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGB8, 2048, 2048, 0, GL_RGB, GL_UNSIGNED_BYTE, java.nio.DirectByteBuffer[pos=0 lim=12582912 cap=12582912])
[trace][1] glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS)
[trace][1] glCreateShader(GL_VERTEX_SHADER) = 1
[trace][1] Shader source for shader [1]:
1 /*
2 * Copyright LWJGL. All rights reserved.
3 * License terms: http://lwjgl.org/license.php
4 */
5 #version 110
6
7 uniform mat4 invViewProj;
8
9 varying vec3 dir;
10
11 void main(void) {
...
[trace][1] glShaderSource(1, org.lwjgl.PointerBuffer[pos=0 lim=1 cap=1], java.nio.DirectIntBufferU[pos=0 lim=1 cap=1])
[trace][1] glCompileShader(1)
[trace][1] glGetShaderi(1, GL_COMPILE_STATUS) = 1
[trace][1] glGetShaderInfoLog(1) = ""
[trace][1] glCreateShader(GL_FRAGMENT_SHADER) = 2
...
[trace][1] glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
[trace][1] glUseProgram(6)
[trace][1] glBindBuffer(GL_ARRAY_BUFFER, 1)
[trace][1] glVertexPointer(3, GL_FLOAT, 0, 0L)
[trace][1] glEnableClientState(GL_NORMAL_ARRAY)
[trace][1] glBindBuffer(GL_ARRAY_BUFFER, 2)
...
There are some places here and there in the GL API, which require manual GLenum decoding, such as the 9729 and 9987 in glTexParameteri(), since those are only enums depending on the pname parameter. For this, it is now also simple to define a custom trace method doing the resolution and parameter/return value printing.
The majority of the remaining work will be providing manual GLenum resolution for those cases.