mikke89 / RmlUi

RmlUi - The HTML/CSS User Interface library evolved
https://mikke89.github.io/RmlUiDoc/
MIT License
2.73k stars 298 forks source link

Nothing renders and app crashes with a minimum example of RmlUI, SDL2, Glad, OpenGL4.6 #633

Closed mtancak closed 1 month ago

mtancak commented 1 month ago

I have tried to create a minimum example to test with RmlUi with the above libraries, but the app crashes after a few seconds without rendering anything. I can see the clear colour that I set with SDL but it seems as if no opengl functions are being called because when I use renderdoc, I can't see any OpenGL calls that would create geometry. I have a feeling that it may be with the way I am using glad?

I tried to update the glad that is being used by RmlUi to be a 4.6 core header only version instead, but I am not getting anywhere.

Minimum example repo: https://github.com/mtancak/rmlui_opengl46_glad2_sdl2_test/tree/main

mikke89 commented 1 month ago

Do you get any log output from RmlUi?

From a quick glance at your repo, it looks like you are missing the context->Update in your update loop! That is definitely something that will cause issues, and might explain the lack of any render output.

Other than that I don't see anything obviously wrong. But it is a bit hard to see exactly what's been changed compared to our backends.

mtancak commented 1 month ago

Thank you so much! That's quite embarassing, I can't believe I missed that line, even in my original repo that I was using to create the minimal example. Thank you!

mikke89 commented 1 month ago

No worries, happy to get you up and running with the library, let us know if you have any other issues :)