-
-
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
Get Old Draw Data To Display If Not Rendered New Data #5252
Comments
But what ? What is the reason you want to do that ? Serious question. If I look at your repro / pseudo code it looks correct: if you don't call NewFrame/Render the draw data won't elapse. So I presume there's something else in your code that's different from that piece of code. We will eventually probably merge #2749 / #4076 but I don't have visibility on when. |
For idle state i know, but when using the application the UI isn't updated until and unless user selects a new tool or pans around or zooms in or out, so i don't want to render the same thing again, i want to use the old render data to display and render again only when the user selects a tool or something like that. |
You haven't answered my question "why?" but I suspect you are over-engineering for a non-problem here. |
Hey @ocornut Sorry for the mess i created, I basically didn't want to render the same thing again because i thought it might cost me some performance, but i ran some tests and didn't found any major performance difference. |
Version/Branch of Dear ImGui:
Version: 1.87
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: Clang++
Operating System: Manjaro Linux
Question:
I am drawing UI for my pixel art tool using ImGui, but since UI isn't updated very often i want to use the old render data to display until and unless new data is rendered, for example:
In this code the if statement is executed atleast once causing ImGui to draw the data, now this statement will only run again when in event handler the
uiShouldRender
is set to1
again,This whole code is inside my window loop:
Problem is i see everything normal on my screen except my UI, my canvas and etc are working Normally except the UI doesn't show up.
I am doing this so that i won't need render everytime even when it is not needed, i know ImGui is a immediate mode rendering UI system but it would be help full if it was possible to use the old draw data if new isn't rendered.
Output I Get:
Output I Get When I Just Draw The UI Every Frame:
The text was updated successfully, but these errors were encountered: