Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Add support to create "AnimatingPanel" via vgui.Create #2209

Open Jaffies opened 1 year ago

Jaffies commented 1 year ago

Headers of that panel

It will allow us to make animated image panel without creating a separate lua logic, which creates overhead. Let C++ make it.

garryspins commented 1 year ago

I'd love to play around with this but this isn't a hard thing to do in lua perfectly fine, if this has some sort of fancy magic going on that lua cant do, I'm all for this, if it just cycles between a bunch of textures, we can do that perfectly easily, maybe even better with a rendertarget sheet of every frame

Jaffies commented 1 year ago

I'd love to play around with this but this isn't a hard thing to do in lua perfectly fine, if this has some sort of fancy magic going on that lua cant do, I'm all for this, if it just cycles between a bunch of textures, we can do that perfectly easily, maybe even better with a rendertarget sheet of every frame

Rendertarget method would likely create a memory leak due to rendertarget inability to deallocate from memory. Also, using C logic to draw something instead of manually calling surface/render functions is generally faster. Everyone wants performance?