I extracted software 2d triangle rasterizer (RGBA only) function from mesa3d.
Its 30% faster than using whole mesa3d lib for imgui.
1080p rendering full screen of standard imgui text on haswell i5-4440 result 6 fps.
I can upload this func there, may be you add it to examples?
interested?
Feel free to upload it in this thread.
It won't be in the example but later when we have a wiki we can store that kind of thing,
6 fps is ridiculously slow though, something must be wrong about that code.
Omar
On 2015/07/25, at 9:37, iperov [email protected] wrote:
I extracted software 2d triangle rasterizer function from mesa3d.
Its 30% faster than using whole mesa3d lib for imgui.
1080p rendering full screen of standard imgui text on haswell i5-4440 result 6 fps.I can upload this func there, may be you add it to examples?
interested?―
Reply to this email directly or view it on GitHub.
If I were to implement a software raster for ImGui I would special case it for quads as even if triangles are submitted I would assume they are often ordered in a quad fashion and quads are much faster than general triangles.
In particular the majority of them are axis aligned here.
On 2015/07/25, at 9:54, Daniel Collin [email protected] wrote:
If I were to implement a software raster for ImGui I would special case it for quads as even if triangles are submitted I would assume they are often ordered in a quad fashion and quads are much faster than general triangles.
―
Reply to this email directly or view it on GitHub.
Yeah that is what I meant
bitblt!
1) 6 fps for 18471 triangles. I think its very good result.
2) why quads if render callback provide triangle vertices ??
because it's faster to render axis aligned quads in software.
yes its faster, but imgui provide only triangles :D
Like I wrote, it should be quite straightforward to detect it. I would assume ImGui often has two triangles in a row that ends up being a quad, doing a check for that and if that is the case, use fast path, otherwise fallback to regular method.
Also adding caching would help a lot, most of the time everything is the same from the previous frame.
If you can afford the development/maintenance you can also replace ImDrawList implementation to give you higher-level primitives informations.
I am drawing lines using triangles (2 triangles for non-AA path, 4 triangles for AA path) because we are trying to minimize drawcalls and state change that are costly with a typical api driving a GPU. However if you are going to software rasterize and care about performanxes you are better off knowing it is a line.
check my VS2005 WinApi software rasterizer imgui example here :] :http://dl.dropboxusercontent.com/u/28559/Cbd/u3d/software%20rasterizer%20imgui.zip
This can probably be made 10 times faster with some non-trivial effort.
For now you can easily:
It'll probably be at least twice faster already.
Then you're best best I would say would be to detect cases of two triangles forming an axis-aligned quad and render those with simpler code.
its just example for your example folder
I used imgui with software render on my remote server where no 3D render available, works perfect on RDP connection.
Thanks for this library.

If you are on Windows Vista or up then you can use D3D11 API and create WARP device when creating D3D11Device object. WARP device provides high performance software rasterizer (much faster than REFERENCE driver type) and it can be used in RDP session.
Here's more information on it: https://msdn.microsoft.com/en-us/library/windows/desktop/gg615082.aspx
@iperov another technique would be to network stream your render data to another computer and display it here. remote_imgui does that:
https://github.com/JordiRos/remoteimgui/
It could be more optimised (delta encode each separate command-list) but does the job. Hope to work on improving and integrating this system so it becomes a default imgui component.
Thanks for the feedback and screenshot. It's interesting to see the sort of use other people are making of imgui, very different from my use. We can try to have a software rasterizer example one day but it's rather low priority.
I'm a bit late to the party, but for anybody else who finds this thread, here is my Dear ImGui software renderer: https://github.com/emilk/imgui_software_renderer/
Most helpful comment
I'm a bit late to the party, but for anybody else who finds this thread, here is my Dear ImGui software renderer: https://github.com/emilk/imgui_software_renderer/