-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
various newbie questions / wishlist for demo #4144
Comments
Hello David, Thanks for your feedback.
Being a "newbie" doesn't allow you to ignore requested issue template and guidelines. By doing so you are hogging our attention and consuming our finite amount of energy. Please be considerate of that. Several your questions are missing the information carefully requested and explained in #2261. Please consider opening one issue for each distinct question and making sure to fill the requested issue template.
If you study the examples app you'll see it is part of the clear color that the examples app are using to clear the framebuffer. It is not the scope of dear imgui to handle or care about that (it would be incorrect to even do so since dear imgui is designed to be overlayed over existing apps running graphics).
Hard to understand your paragraph and won't read/answer it without a more detailed explanation (again, see #2261).
Has nothing to do with dear imgui. ImVec4 are 4 float components feel free to create your own macros if you think it makes thing more readable this way.
That's OS specific and has nothing to do with the purpose of Dear ImGui.
You answered your own question with the code. We currently won't promote using that until dear imgui has a better scheme for automatically allowing fonts of any sizes. Also the demo only relies on the fixed-size bitmap font embedded in code so difficult for demo to rely on extra fonts from file system.
As stated in that WIKI entry it's not really an Dear ImGui question, we are covering it since it's a frequently asked thing but it's not our job to provide a fancy 3d/graphics engine.
Because it's not the purpose of dear imgui. |
Keep in mind that GDI (the portion of the Win32 API you're referring to) is literally as old as Windows its self. It was designed for an era where hardware-accelerated rendering did not exist and computers were slow as dirt. Modern graphics APIs can be used that way, but in practice it is not very common to see them that way in game-like applications (which is arguably what Dear ImGui focuses on and excels at.) You should generally not be applying expectations or usage patterns from GDI to anything modern. There are various issues/pull requests about modifying Dear ImGui to avoid re-rendering when nothing has changed (#2749 #3124 #4076 #4133), but even then they're still re-rendering the entire screen rather than any sort of dirty rectangle rendering strategy. If you're making a game, you really probably shouldn't be thinking about anything beyond vsync anyway because games tend to inherently need the entire screen redrawn most of the time. |
I'm just starting out and although I LOVE imgui_demo there are a few things it I haven't been able to figure out from it.
I'm using win10, VS, and c++17
My Q are:
In my win32 app I was able to draw text to the window from the middle of a function by holding the hdc open.
It crashes when I call ImGui::Render() without an ImGui::End() first, but because I'm in the middle of a function I don't want to.
And currently when I exit the function it also clears the window of any text I had placed there (win32 only did it when you repainted)
Am I forced to run a totally separate rendering thread from the function thread, and keep a vector to store the text I want painted to the window and just keep painting it back in during the render cycle. This seems incredibly inefficient when I just want the window left alone (but I can't just totally bypass the rendering code or any other windows will also be affected)? Or is there a window specific ImGui::RenderFreeze()?
I would REALLY like to see a demo of how to do this well in imgui_demo (and also a live progress bar in the same vein - I'm currently using one from here: Progress Indicators (spinner + loading bar) #1901)
Is there an "im_gui" way of separating the color from the alpha. I have the following, but it seems like something which should be part of the library? I've also attached my header in case it's any use - but you'll have to rename from .txt to .h
colours.txt
Also why isn't there the setting for the main background colour in the colourscheme?
Instead the example has it defined in the "main" routine to be called later in the render code
ImVec4 clear_color = ImVec4(CF_white, 1.00f);
There are some other things I would like in imgui_demo (or maybe I just haven't found them)
I eventually found this: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
But it took me a little while to realise it wasn't working in my module because the example didn't mention you need to reference the backend (obvious now but not as a total newbie)
#include <GL/gl3w.h>
And why couldn't stb_image.h just be included in the Dear im_gui distribution?
Thanks
David
The text was updated successfully, but these errors were encountered: