LWJGL / lwjgl3-demos

Demo suite for LWJGL 3
BSD 3-Clause "New" or "Revised" License
351 stars 89 forks source link

Fix bgfx demo #55

Open Protoxy22 opened 5 months ago

Protoxy22 commented 5 months ago

I'm not 100% sure about the code, but at least the bgfx demo works again (tested on Windows)

Spasi commented 5 months ago

Hey @Protoxy22,

Thanks for the patch! The new code is fine and the old code is indeed not working. However, it looks like there's a relative recent bgfx bug that broke it:

https://github.com/bkaradzic/bgfx/commit/72cbe8327509738612afa336195ef40d71a34048#diff-75ed10dd2a2698c8707c9c9750ec40b3d12bbdf747f0c18514ed89caa3b2c522L1881

~Should have kept the other memCopy, that copies from g_platformData to m_init.platformData.~ I'm currently building bgfx with a fix, it will be available in the next 3.3.4 snapshot.

Spasi commented 5 months ago

Ended up with a different fix, but I can verify that the issue is resolved with the latest bgfx build and the original code. You can download the fixed build from https://www.lwjgl.org/browse/nightly.