library is great. I compiling it on mac os x
sdl2 and Opengl
How I can draw directly on main window, for example line.
Where i must put this to example sdl opengl
?
(i undestand the gui will draw on my draw in main window, but gui windows are movable)
glLineWidth(20);
glColor3f(0.80, 0.0, 1.0);
glBegin(GL_LINES);
glVertex2f(50, 80);
glVertex2f(20, 20);
glEnd();
glLineWidth(12);
glColor3f(1, 0.0, 0.0);
glBegin(GL_LINES);
glVertex2i(10,10);
glVertex2i(200,320);
glEnd();
ImGui has API to do drawing, see the demo window -> Examples -> Custom rendering.

Codes:
https://github.com/ocornut/imgui/blob/169e3981fdf037b179f1c7296548892ba7837dae/imgui_demo.cpp#L3871-L3978
This draw on gui image not on main window
not background
bottom all gui windows, i found in example directory
https://github.com/ocornut/imgui/blob/169e3981fdf037b179f1c7296548892ba7837dae/examples/example_sdl_opengl3/main.cpp
glViewport(0, 0, display_w, display_h);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
yes, using opengl directly. meybe imgui change some context? diff sample code will be help
I put my code but not working, anybody can help?
Meybe normal SDL_ function working?
But where is SDL_Surface?
Sorry this is an OpenGL question, not a dear imgui question.
imgui not have any way to draw on canvas=main window?
Most helpful comment
Sorry this is an OpenGL question, not a dear imgui question.