Closed kyle-vasilia closed 4 years ago
I don't have a Linux system available to test this, but is pd.nwh = &wmi.info.x11.window;
actually correct? You probably need to correct it to this: pd.nwh = wmi.info.x11.window;
Actually, which API version of bgfx are you using? The latest bgfx master is 108
and the 0.3.1
of the bindings targets 106
, and there was some changes in 108
to the initialization structures, which might explain the error if the structs are not in sync.
I updated the bindings to target version 108
in case that was the problem.
That fixed it for me and allowed for bgfw_init to work and log everything it was able to load! I'm having trouble getting it to bind to the SDL2 window and I suspect the error is close to what you discussed with & not being needed so I will see where I can go with this. - But for now init works fine now without throwing tons of errors. (PS: If anyone has been able to get bindbc bgfx and sdl to work on linux let me know how you did it!)
I’m not sure if this is the appropriate way to re-open but has anyone been able to get it to work with bindbc-sdl with anything that uses the x11 win handle passing to platformdata?
Got it working - if anyone else wants to see how I did it for reference: https://github.com/kyle-vasilia/DLang-SDL-BGFX
Hello!
Excuse me if I don't format this issue with enough information or it seems like a simple problem.
Using this with bindbc-sdl and as a dynamic library gives off the runtime error:
libGL error: failed to create drawable libGL error: failed to create drawable X Error of failed request: GLXBadContext Major opcode of failed request: 150 (GLX) Minor opcode of failed request: 26 (X_GLXMakeContextCurrent) Serial number of failed request: 219 Current serial number in output stream: 219
I am certain it isn't an issue with the bgfx library I built - as I was able to run the examples just fine. glxinfo brings upI am not sure what I'm doing wrong, if it's an issue with how I compile bgfx that doesn't match with D or if this is a bug, any tips would be great!
I'll go ahead and include the full source of how I do it.
Using bgfx as a static library won't work either - it'll throw tons of errors of undefined references and all around the bgfx/bx/bimg api - I suspected it being a compiler mismatch and I added "dflags-dmd": ["-m64"] but it didn't work either. Cheers!