- Guildcard
- 42017744
Started adding this to my local copy of my fork. I'll do some light sanity testing and push them to github in a day or two when I have time to test some more. Plain AddRect() is in the top right window (realized it's hard to see because I was making things blue after I finished checking the window).Is it possible to get the shape primitives for imgui implemented and accessible via lua in the addon base (aka dinput8.xxx)? Using the currently available-to-lua imgui methodimgui.BeginChild("NAME",boxSizeX,boxSizey,drawBorder==true))
I get fairly large frame drops after drawing more than ~20 rectangles. More than ~2-3 fps drop from 30 and the game feels like playing without an h/battle or v101.
without drawing:
View attachment 23303
vs.
View attachment 23304
Even running all the item filtering,sorting, x/y position calculations, ect, ect the biggest frame drop is on "render".
I would like to be able to more efficiently draw shapes such as a square around item drops or enemies for an addon I'm working on that can be found here:
GitHub - X9Z0-M2/psobb-dropbox-tracker: PSOBB Lua Addon to show what a drop contains, which ones are important loot, and where it is onscreen
PSOBB Lua Addon to show what a drop contains, which ones are important loot, and where it is onscreen - X9Z0-M2/psobb-dropbox-trackergithub.com
Check out this github link for an example of the relevant methods in imgui, which I'm hoping may solve my fps issue:
imgui/imgui_draw.cpp at master · ocornut/imgui
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies - ocornut/imguigithub.com
Basically they need a window to render to, so you could create one imgui window that covers the entire screen, make it transparent, NoInputs, etc like you're already doing, and then render all of the primitives directly to it.
Would you be willing to quickly test if they fix the performance issue once I push the changes? You'll need to build the plugin from source. If they work fine, I can ask Soly to do a new release with these changes (this would also include my 2022 fix for 'white addons' at main menu and disappearing ingame in dark rooms).
There is a "require_version" function in the plugin's pso table. You can check if pso.require_version is nil or if pso.require_version(<whatever the next version is>) returns false to know if someone needs to update their addon plugin, in case you want to support the old way or tell people to upgrade.
Last edited: