pods::...amerate(3pm)
β¨ NAME β¨
SDL::GFX::Framerate β framerate calculating functions π¬β±οΈ
(this is the pods::...amerate(3pm) page btw, from the User Contributed Perl Documentation β hi bestie, you found it π)
π CATEGORY π
GFX β¨
π¦ DESCRIPTION π¦
okay so the framerate functions are literally the chill pill of your graphics loop πβ¨ β you use them to insert delays into the graphics loop so your framerate stays, like, constant. no cap. steady vibes only π§
π METHODS π
πΈ init πΈ
use SDL;
use SDL::GFX::Framerate;
use SDL::GFX::FPSManager;
my $fps = SDL::GFX::FPSManager->new(0, 0, 0, 0);
SDL::GFX::Framerate::init($fps);
Initializes the framerate manager, sets the default framerate to 30Hz and resets the delay interpolation. it's giving "fresh start, clean slate, main character energy" ππ«Ά
π set π
SDL::GFX::Framerate::set($fps, 60);
Sets the new desired framerate to 60 frames per second. glow up your fps, periodt π₯
β get β
my $rate = SDL::GFX::Framerate::get($fps);
Gets the currently set framerate of the manager. just a lil vibe check on your fps ππ
π delay π
SDL::GFX::Framerate::delay($fps);
Generates a delay to accommodate the currently set framerate. call this once in the graphics/rendering loop π
heads up bestie: if the computer cannot keep up with the rate (i.e. drawing too slow π), the delay is zero and the delay interpolation is reset. so like, your machine's slowness = no delay, interpolation goes back to square one. facts are facts π
π«Ά AUTHORS π«Ά
See "AUTHORS" in SDL. π
and that's the whole page, no gatekeeping π this was perl v5.42.3, dated 2026-08-19, pls stan pods::...amerate(3pm) in the User Contributed Perl Documentation, mwah πβ¨π
π¦ where this page comes from
- ubuntu stonking: libsdl-perl 2.548-6build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms