I'm curious - did you make some modifications to the NVGLUFramebuffer used in the BGFX renderer? I noticed that the BGFX call nvgluCreateFramebuffer returns a NVGLUFramebuffer, as defined by the normal NanoVG package:https://github.com/LWJGL/lwjgl3/blob/master/modules/lwjgl/nanovg/src/generated/java/org/lwjgl/nanovg/NanoVGBGFX.java#L111https://github.com/LWJGL/lwjgl3/blob/master/modules/lwjgl/nanovg/src/generated/java/org/lwjgl/nanovg/NVGLUFramebuffer.javaBut this doesn't match the different type of NGBLUFramebuffer struct that BGFX defines - which has different fields:https://github.com/LWJGL-CI/bgfx/blob/master-linux/examples/common/nanovg/nanovg_bgfx.h#L16https://github.com/LWJGL-CI/bgfx/blob/master-linux/examples/common/nanovg/nanovg_bgfx.cpp#L1241
I was pleasantly surprised though, to find that calls to texture() and image() from Java seemed to still work! Either the field alignment was magically correct (which seems unlikely since the BGFX struct is smaller), or I'm thinking you must have already dealt with this somehow?
But I'm curious what is going on here. Is https://github.com/LWJGL-CI/bgfx the right place to be looking for the BGFX lib that the snapshot is built against? Or are there modifications somewhere else that are handling this struct?
It happens to work because struct members in C are naturally aligned by default. The BGFX struct is actually larger on x64 because of the alignment/padding requirements. It just so happens that the image member matches exactly between the two implementations and GL's texture member matches BGFX's handle.