pods::...verlay(3pm)
π NAME π
Okay so this page is pods::...verlay(3pm) from the User Contributed Perl Documentation, and it's giving SDL::Overlay β YUV Video overlay, bestie π
β¨
πΈ CATEGORY πΈ
Core, Video, Structure β all three, periodt π
β¨ SYNOPSIS β¨
First, import these modules so you can get access to the constants and functions the overlay needs β literally the starter pack, no skips:
use SDL;
use SDL::Video;
use SDL::Overlay;
Init the video subsystem, okay?
SDL::Init(SDL_INIT_VIDEO);
Make a display to use:
my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
Then create and attach the display to a new overlay β slay:
my $overlay = SDL::Overlay->new( 100, 100, SDL_YV12_OVERLAY, $display);
π¦ DESCRIPTION π¦
A SDL_Overlay allows for video rendering on an SDL_Surface which is a display. It's giving "put the video right here" energy.
The term 'overlay' is a misnomer, okay? Because unless the overlay is created in hardware, the contents for the display surface underneath the area where the overlay is shown will be overwritten when the overlay is displayed. So yeah, not exactly a transparent little sticker β be aware ππ
π₯ METHODS π₯
π new ( $width, $height, $YUV_flag, $display) π
The constructor creates a SDL::Overlay of the specified width, height, and format (peep the YUV_Flags list below for the available formats), for the provided display. Iconic.
β οΈ Note: the 'display' argument needs to actually be the surface created by SDL::Video::SetVideoMode β otherwise this function will segfault, and nobody wants that π
my $overlay = SDL::Overlay->new( $width, $height, $YUV_flag, $display );
π YUV_Flags π
More information on YUV formats can be found at <http://www.fourcc.org/indexyuv.htm> .
SDL_YV12_OVERLAYβ0x32315659β/* Planar mode: Y + V + U */SDL_IYUV_OVERLAYβ0x56555949β/* Planar mode: Y + U + V */SDL_YUY2_OVERLAYβ0x32595559β/* Packed mode: Y0+U0+Y1+V0 */SDL_UYVY_OVERLAYβ0x59565955β/* Packed mode: U0+Y0+V0+Y1 */SDL_YVYU_OVERLAYβ0x55595659β/* Packed mode: Y0+V0+Y1+U0 */
π§ format π§
Overlay format β see YUV_Flags above, bestie.
π§ w, h π§
Width and height of overlay.
π§ planes π§
Number of planes in the overlay. Usually either 1 or 3.
π§ pitches π§
An array of pitches, one for each plane. Pitch is the length of a row in bytes. One per plane β keep up π
π§ pixels π§
As of release 2.3 direct right to overlay is disable.
An array of pointers to the data of each plane. The overlay should be locked before these pointers are used.
See SDL::Video::lock_YUV_overlay, SDL::Video::unload_YUV_overlay.
π§ hw_overlay π§
This will be set to 1 if the overlay is hardware accelerated. Slay.
π«Ά AUTHORS π«Ά
See AUTHORS in SDL. That's the whole reference, no cap.
Okay that's the page, bestie β source/version is perl v5.42.3 and the date on it is 2026-08-19. 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