-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Windows GDI Renderer Support. #2724
base: master
Are you sure you want to change the base?
Conversation
拿走了。老哥牛逼。老哥稳 |
Hello, Thanks for the PR.
I don't know what "Microsoft Windows Setup Image" is nor details about Windows PE so I don't quite understand the problem. Finding it hard to believe that any version of the Windows from the past decade and a half wouldn't expose a 3D rendering API. While this is working I have a few issues with it:
|
Microsoft Windows Setup Image is a modified version of Windows PE, which is used in Windows Setup Media. (DVD or USB stick) Windows PE is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. Here is the introduction: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro
I am agree with you and I am trying my best to improve the performance. I have some font texture issues with GdiGradientFill API (In my PR, there are some lines commented, this is the implementation which I want to PR to you finally if I have solved the issue.). If someone or myself can solve the problem (I can render everything without font texture.), it will at least 5 times faster than before (about 500 fps on the same computer), and have a more stable FPS value.
I have follow the C++11 standard. Look at the "nullptr" which is one of my favourite C++11 features, lol. imgui_software_renderer don't use C++11 features because I want to remove them if I can solve the issue I said in this reply. Thank you very much. Kenji Mouri |
this is a good support for app can't run at hardware acceleration scene. |
performance is very too low? when long time to running. only 3-5 FPS (Debug Mode),if release mode only 30-35FPS |
I am sorry. Yes, the speed is too low. (On my i7-8750H laptop, only 120 FPS in Release mode.) I try to use some Windows GDI APIs to improve the performance. (About 500 FPS with low CPU usage and integrated graphic.) But it has some bugs. One of my friends suggest me that I also should use SIMD to improve. Kenji Mouri |
I have tried to implement the partial acceleration with Windows GDI. (Use Windows GDI to render non-texture triangles.) But It has some render bugs, everyone can try it and know it. (I can compile my code on desktop with Visual Studio 2019.) I will continue to improve them. Kenji Mouri |
Please integrate this into the latest release. |
8b83e0a
to
d735066
Compare
b3b85d8
to
0755767
Compare
c817acb
to
8d39063
Compare
lgtm, I wouldn't recommend anyone to use such a slow backend without a special reason however it is pretty useful for some special cases. |
Introduction
Windows GDI Renderer, based on emilk's imgui_software_renderer.
Why imgui?
I have started to create a new open source system image tweaker utility called Nit in recent days. But I am worry about which the UI framework should I choose for this project because not only it should be easy to use but also it needs to support Windows PE and Windows RE.
I don't want to use the MFC or ATL/WTL because it's not easy to use, especially the modern UI experience development. I also don't want to use Qt, wxWidgets or GTK because of the license which it's not support static linking, and it makes my project's binary much bigger. I can't use WinForms or WPF because there is no .Net Framework installed in Microsoft's Windows Setup Image.
This is why I choose the imgui, because it's flexible and easy to use. (I used imgui several months ago because my friend's 2D game engine editor need my help.) You can implement the backend for it.
Why I implement the GDI Renderer?
I can't choose Direct3D, OpenGL or Vulkan because there is no support in Microsoft's Windows Setup Image. I also don't choose Direct2D because it's not exist until Microsoft Windows 8.1's Setup Image.
This is why I choose the GDI and implement the GDI backend for imgui.
Why the GDI Renderer is based on emilk's imgui_software_renderer?
Because I don't know how to implement the ImTextureID support with pure Windows GDI APIs. I have kept my implement which only based on Windows GDI APIs as comments in the end of the source code file because I hope help some one solve the problem.
Known issues
Screenshots
Windows 10, version 1903
Windows PE, build 6.1.7601
Kenji Mouri