opened
IL4WI
username_0
Rendering pyimgui using the render engines given renders imgui in an window. Is there a way to hide the window or render completely without it? Im new to coding gui but as far as im concerned the render engine used could render without popping up a window in wich it renders?
Rendering windowless OpenGl
issue
created
swistakm
username_1
You mean off-screen rendering right? I.e. rendering to the framebuffer without displaying to the use so it could be used elsewhere (e.g. written to file). The answer is yes. And we already do something like that for the documentation purposes.

ImGui doesn't know anything about window context and generally renderers doesn't have to know either. Some of the built-in integration helpers from `imgui.integrations` obviously will assume that there's a window because it is the most common use case.

If you want to see how to render to the framebuffer without having actual window you should definitely check out the code in  [doc/source/gen_example.py](https://github.com/username_1/pyimgui/blob/master/doc/source/gen_example.py) file because that's where we use off-screen rendering for creating image samples you can see in documentation. We use `glfw` there so technically there is some window context (e.g. you will be able to  see app in your dock on macOS) but invisible. How it would be actually done is dependent on the library you'll use for setting up the gl context and handling user interactions. Some of them will allow to work without windows, some won't.

If you meant rendering without window decorations and e.g transparent then this is completely dependent on the windowing library you use. GLFW for instance allows to easily render both the transparent windows and undecorated ones.
comment
created
swistakm
username_1
Note that code in `gen_example.py` is a total mess but should at least give some insight on how it can be done.
comment
created
IL4WI
username_0
If im understanding the code correctly you are rendering it invisible for the user
what im talking about is that you "open" up a window and render it in the window. The window should be gone and imgui only visible. But maybe im just reading the code wrong
comment
created
swistakm
username_1
Unfortunately I’m still bit confused. Generally ImGui just gives you list of draw commands that you execute in some context with renderer backend of choice. Technically you could even render it as ascii art in terminal although translating these draw commands to such form would be quite problematic.

Still I don’t know what do you want to achieve. Do you want to simply render ImGui widgets without any window? Do you want to make overlay on top of other application? Or maybe just want to get rid of window decoration? Could you better describe the problem you want to solve or visualize the effect that you want to achieve?
comment
created
inequity
username_2
Sounds like he wants to render outside of the operating system window. Highly platform specific I think. It's definitely possible on Windows, but it takes work. As an example:

1. Create fullscreen borderless window, or window the size of the rect that contains your widgets
2. Screenshot the desktop with BitBlt
3. Render window with that screenshot as background, IMGUI over top
4. Override input handling to pass through any events that aren't handled by IMGUI widgets

It's been years since I've done this. Maybe something better suited for asking over at the official imgui repo
comment
created
swistakm
username_1
Like @username_2 said, imgui isn't system windowing library but a gui toolkit designed to be used within existing window context. You could make it look like standalone window to some extent with transparent backgrounds and removing decorations but it won't work well if you want to make multiple freeform windows (think of Gimp UI).

I'm closing this because of the above and also due to inactivity of discussion.
comment
closed
swistakm
username_1
issue