Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dear Imgui
#2
To get it working you only need the base imgui files, and the imgui_imp_opengl3.h version header, to get ES2.0 you need to uncomment the IMGUI_IMP_OPENGL_ES2 value which is in imgui_imp_opengl3.h

You will need to provide key and mouse data to it, in its frame update, be sure to set your mouse pos info correctly depending on screen/window size. Since our keys and mouse are on a thread its not a problem to feed it the mouse and key data from an input handler as normal. I wouldn't give it its own input handler though, try to only use 1

Then there is 1 final problem where it has a slight issue with some GL3 flags not supported by ES2 but you can hard code them to allow it to compile.
last_blend_equation_rgb and last_blendequation_alpha, expect to be set by an interrogation of the API, but it will never return a valid value (we don't have opengl3), so just set them to GL_FUNC_ADD (or NULL???) For sure they are supposed to do something but so far I've not found out what .

If you are doing an engine or need a lot of menu/setup input its excellent, but for general gui use in game be careful, its not especially fast, and can drag your frame rate down quite a bit.
There's plenty of examples in the github to show you how to use it. Have fun!

props to my student David van Scheppingen for introducing this to me and doing the groundwork to get it working on Rpi
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply


Messages In This Thread
Dear Imgui - by Brian Beuken - 04-09-2019, 08:48 AM
RE: Dear Imgui - by Brian Beuken - 04-10-2019, 01:04 PM
RE: Dear Imgui - by Brian Beuken - 01-07-2020, 12:32 PM
RE: Dear Imgui - by Brian Beuken - 01-07-2020, 01:56 PM
RE: Dear Imgui - by Brian Beuken - 01-10-2020, 10:25 AM
RE: Dear Imgui - by jomoengineer - 01-19-2020, 05:05 AM
RE: Dear Imgui - by Brian Beuken - 02-02-2020, 12:29 AM
RE: Dear Imgui - by Brian Beuken - 11-28-2020, 06:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)