Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-10-2020, 04:11
atom0s's Avatar
atom0s atom0s is offline
Family
 
Join Date: Jan 2015
Location: 127.0.0.1
Posts: 431
Rept. Given: 26
Rept. Rcvd 130 Times in 67 Posts
Thanks Given: 54
Thanks Rcvd at 837 Times in 306 Posts
atom0s Reputation: 100-199 atom0s Reputation: 100-199
Some comments on what you've suggested so far. (I'm very familiar with ImGui and use it in multiple game-related projects.)

1. You can cut down the 'bloat' as well by disabling the demo code.
Code:
#define IMGUI_DISABLE_DEMO_WINDOWS
4. Would recommend avoiding file loads of fonts to remove on-disk/installed font requirements. Instead, use ImGui's memory based loaders and store the font in the programs resources or as a raw static array.
Code:
AddFontFromMemoryTTF
AddFontFromMemoryCompressedTTF
AddFontFromMemoryCompressedBase85TTF
5. Keep in mind, the Win32 implementation of this does add some extra things and is part of the example projects and not the core of ImGui. You can find the code for it here:
https://github.com/ocornut/imgui/blob/master/examples/imgui_impl_win32.cpp#L344

Using this setup will also link against gdi32.dll as an extra import.

As for the scaling of things, ImGui has a means of doing these steps globally instead of having to track and handle the scaling yourself per-object/per-font.

For fonts, the ImGui::IO object holds a setting value for this called:
Code:
ImGui::GetIO().FontGlobalScale
For objects, you can alter this to up-scale objects by altering the 'DisplaySize' and adjusting the render buffer while drawing. You can see an explanation of that here:
https://github.com/ocornut/imgui/issues/1786#issuecomment-523332319


As for handling rendering, ImGui is designed for games but can be implemented into [virtually] anything as you are in control of how it renders. There used to be a GDI/GDI+ renderer for it but was discontinued as time went on. For a keygen, this would probably be the ideal framework to use as the renderer instead of Direct3D/OpenGL/SDL to keep resources low (if that matters to you). GDI/GDI+ is also back-supported since Windows XP so it should work on any Windows machine, so the total support coverage will be easier to deal with.

You can find a pull request that is for a GDI renderer here:
https://github.com/ocornut/imgui/pull/2724

I'd recommend using GDI+ instead though for the newer features and better performance.

Along with that, you can also introduce layered window usage if need be to completely remove the window and make things transparent by doing this. You can render ImGui to a GDI+ bitmap/surface and use UpdateLayeredWindow to do the final draw/blit with transparency as needed. (Be sure to render the ImGui scene with the needed transparent color key so the unused/background area is the proper color etc.)
__________________
Personal Projects Site: https://atom0s.com
Reply With Quote
The Following User Gave Reputation+1 to atom0s For This Useful Post:
WhoCares (04-10-2020)
The Following 4 Users Say Thank You to atom0s For This Useful Post:
Abaddon (12-06-2022), chants (04-10-2020), sh3dow (12-07-2022), SinaDiR (04-11-2020)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reverse files of Framework .NET 2.0 Asus General Discussion 5 06-05-2007 15:16


All times are GMT +8. The time now is 06:34.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )