Getting hovered states after Render() #7279
WickedP666
started this conversation in
Build/Link/Run/Fonts issues ONLY!
Replies: 1 comment 2 replies
-
Hello, Beside, you should specify why you are doing this, e.g.
Why would you need that after Render() ? Why can't you query the imgui state you need during the imgui frame etc. The issue has nothing to do with rendering, since imgui doesn't care about when you are rendering. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I have an off-screen GLFW window, used as an off-screen renderer. I'm catching the rendered image and displaying it in another dialog, outside of GLFW. Unfortunately, I have to do it this way, because the SDK I'm using does not communicate with windows other than it's own. The software is a plugin that works inside another well-known 3D application, which has it's own dialog system. It only communicates with it's own dialogs. Everything, including the mouse and user interaction catches, are handled in the main (non-GLFW) dialog.
I came across Dear Imgui recently in the hope it would replace my own custom GUI interface engine. ImGui seems to have provided a really good and helpful alternative on this front:
However, because of the way my dialog system has to work, I need to be able to execute things like mouse testing after the call to Render(). Is it possible for example, to manually test some sort of window/item map to see what's under the mouse at any position on the last frame?
I've made my own wrapper to handle the drawing and can change the styles to handle my own focusing etc. So I'm prepared to do some manual work to handle the 'interactive' things.
I've spotted functions like ImGui::UpdateHoveredWindowAndCaptureFlags(), but these don't appear to cover my needs (happy to be corrected). It seems as though things need to be set in ImGui first, before being rendered. Whereas I need to render, then test to see what's there.
I realise this may not quite be ImGui's intended way of use here (again, happy to be educated), but is there an alternative method that could make this work? I'm not quite sure of the solution, if there is one. An ID map I can read myself maybe? What would/does this look like?
Hoping I've explained enough for context. Unfortunately my hands are tied on the windowing system and the process order. And apologies if a solution already exists, I just can't see it or make it work. If you need more from me, let me know.
Regards,
WP.
For reference:
Version:
#define IMGUI_VERSION "1.90.2 WIP"
#define IMGUI_VERSION_NUM 19013
Files:
#include "imgui-master\imgui.h"
#include "imgui-master\imgui_internal.h"
#include "imgui-master\misc\cpp\imgui_stdlib.h"
#include "imgui-master\misc\single_file\imgui_single_file.h"
//#include "imgui-master\misc\freetype\imgui_freetype.h"
#include "imgui-master\backends\imgui_impl_glfw.h"
#include "imgui-master\backends\imgui_impl_opengl3.h"
Beta Was this translation helpful? Give feedback.
All reactions