Skip to content

Question: how does initializing imgui + raylib work? #2

Description

@tdgroot

In the template, ImGui is initialized with the following code:

    InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "Window Title");

    ImGui::CreateContext();      
    ImGui::StyleColorsDark();

    ImGui_ImplOpenGL3_Init();    
    ImGui_ImplRaylib_Init();

When I try that, the ImGui_ImplOpenGL3_Init call fails when it calls the glGetIntegerv() function to fetch the OpenGL versions. To clarify: rendering with raylib works just fine and the PLATFORM_DESKTOP and GRAPHICS_API_OPENGL_33 constants are defined.

Is there a missing step in the template?

Usually it's necessary to also call ImGui_ImplGlfw_InitForOpenGL(window, true); <- which binds the glfw context to ImGui?

Anyway, I'm interested if there's more to it than described in the template, because I can't seem to get it to work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions