Dear Imgui / Imgui Bundle UI integration for UPBGE and RanGE!

Recently updated my imgui integration for BGE, so I thought I’d make a post here.

Dear Imgui is a fully-featured UI system built on the IMGUI paradigm - which basically means the UI is updated every frame using a really simple API. (Now this doesn’t mean it’s slow, because it actually doesn’t do immediate-mode rendering, instead it generates a fast vertex buffer for the GPU to render).

Anyways, I didn’t want to have to write a whole UI library from scratch, and imgui is pretty cool, so I decided to just cram imgui into upbge! can’t be too difficult, right? :stuck_out_tongue: Turned out to be a lot of PyOpenGL wackiness, but I eventually got it working.

Features

Credit to the imgui_bundle library here for the amazing python bindings and example opengl integrations. Also originally used the pyimgui library for rendering and initial integration. And of course, credit to the original Dear Imgui library by ocornut here

  • Full windowing system
  • Docking support
  • Viewports in 3D using textures as well as main 2D UI
  • Wrapper classes to easily use the library with bge

This is a mainly python-based library, so to make UI you will need to know some basic python.

Some videos

Check out the code here:

5 Likes

Great job! I’m using it in my game and it’s phenomenal!!