How to render other than imgui in SDL 2 + OpenGL 2

Hello guys,

So I have used the SDL 2 + OpenGL 2 example to get a window with dear imgui on it but trying to draw anything with SDL calls does not work, i checked the list of software using dear imgui and i found this one https://github.com/allender/apple2emu (which uses OpenGL 3 + SDL 2) for my project i really just want to use OpenGL 2, by what i saw in that repo is that to draw something they use OpenGL calls instead of SDL calls, which gives me those questions:

  1. So I can’t draw anything above dear imgui with SDL calls?
  2. So whats the purpuse of using SDL with dear imgui other than handling window creation, keystrokes… but the draw?
  3. How can I achive if possible to draw things on screen while using dear imgui SDL 2 calls and OpenGL 2?

After all, mind me I’m a programmer specialized in mathematics, algorithms and data and some high level graphics. I got a basic unerstanding of the OpenGL flow (thanks to the OpenGL bible 4th edition(was it 5th im unsure right now) and I want to learn more about low level graphics stuff for some projects that I want to develop later as this i picked a gb emulator as my start so bear with me I’m not well versed at programming low level graphics stuff.

Here is an example of how it looks (sorry for the bad quality and not edition): https://streamable.com/s6ytn

As you can see the little 50x50 at y:50, x:50 viewport only appears at the start and yes i made sure its inside the render loop.