c99-raylib-cimgui-template
c99-raylib-cimgui-template copied to clipboard
Font Failed to load


`// Initialize imgui igCreateContext(NULL); struct ImGuiIO *io = igGetIO();
ImGui_ImplRaylib_Init();
igStyleColorsDark(NULL);
int width = screenWidth; int height = screenHeight; unsigned char *pixels = NULL; ImFontAtlas_GetTexDataAsRGBA32(io->Fonts, &pixels, &width, &height, NULL);
Image image = LoadImageEx((Color *)pixels, width, height); Texture2D texture = LoadTextureFromImage(image); io->Fonts->TexID = (void *)&texture.id;`
The font isn't loading right or rendering right or it just isn't using the font The texture atlas for the font does load and is draw onto the screen as seen. help pls!!!
Also I'm using C++17 and the latest version of raylib (should I just use another implementation???)
[note I'll just use : https://github.com/JeffM2501/raylibExtras/ ]
Replace rlEnableTexture() with rlSetTexture(). This made the difference for me.
I'm afraid that function behaviour was changed in raylib 4.0 to be aligned with OpenGL. It probably broke some samples out there...
I ended up using the normal imgui libary with a raylib implementation.
FIX