pods::...eoInfo(3pm)

πŸ’– NAME πŸ’–

SDL::VideoInfo β€” Video Target Information ✨

Oh and quick heads up bestie, this page lives in the User Contributed Perl Documentation section of the manual (3pm), so you're in the right place 🫢

🌸 CATEGORY 🌸

Core, Video, Structure


⭐ SYNOPSIS ⭐

my $video_info = SDL::Video::get_video_info();

okay so listen β€” VideoInfo is only accessible through SDL::Video::get_video_info. That's the one and only door in πŸ”‘. This module literally just hands you getters for the struct SDL_VideoInfo, and that's it, that's the whole vibe.


πŸ¦‹ DESCRIPTION πŸ¦‹

This object is a read-only structure (no cap, you cannot write to it, do not try) and it's returned by SDL::Video::get_video_info.

It's giving ✨informant✨ β€” here's what it tells you about:

  • the best available mode, if you called it before SDL::Video::set_video_mode, or
  • the current video mode, if you called it after SDL::Video::set_video_mode.

Depending on where you are in your setup, the tea is different πŸ’…


πŸŽ€ METHODS πŸŽ€

πŸ’œ hw_available

$video_info->hw_available() # 1 if Hardware Accelerated Surfaces available

Is it possible to create hardware surfaces? πŸ€” Returns 1 if hardware accelerated surfaces are available.

πŸ’œ wm_available

$video_info->wm_available() # 1 if Window Manager available

Is there a window manager available? πŸͺŸ Returns 1 if a window manager is available.

πŸ’œ blit_hw

$video_info->blit_hw()

Are hardware to hardware blits accelerated? ⚑

πŸ’œ blit_hw_CC

$video_info->blit_hw_CC()

Are hardware to hardware colorkey blits accelerated? 🎨

πŸ’œ blit_hw_A

$video_info->blit_hw_A()

Are hardware to hardware alpha blits accelerated? 🌈

πŸ’œ blit_sw

$video_info->blit_sw()

Are software to hardware blits accelerated? πŸ”₯

πŸ’œ blit_sw_CC

$video_info->blit_sw_CC()

Are software to hardware colorkey blits accelerated? 🎨

πŸ’œ blit_sw_A

$video_info->blit_sw_A()

Are software to hardware alpha blits accelerated? 🌈

πŸ’œ blit_fill

$video_info->blit_fill()

Are color fills accelerated? πŸ–ŒοΈ

πŸ’œ video_mem

my $video_mem = $video_info->video_mem();

Total amount of video memory in Kilobytes πŸ“Ό

bestie, important: only access this if hw_available == 1 🚨 otherwise it's just 0 and you're reading nothing. iykyk.

πŸ’œ vfmt

my $vd_pixel_format = $video_info->vfmt();

The SDL::PixelFormat of the video device πŸ–ΌοΈ

πŸ’œ current_w, current_h

$video_info->current_w();
$video_info->current_h();

Width and height of the current video mode πŸ“ β€” or, if SDL_GetVideoInfo was called before SDL::Video::set_video_mode, the width and height of the desktop mode instead. (available since SDL 1.2.10 πŸ—“οΈ)


🌟 SEE ALSO 🌟

  • SDL::Video
  • SDL::PixelFormat

πŸ‘‘ AUTHORS πŸ‘‘

See "AUTHORS" in SDL. 🫑


and that's the whole page, bestie πŸ’… go forth and query your video info responsibly πŸ§šπŸ’–

sign-off szn πŸŽ€ β€” this glam little number is from perl v5.42.3, dated 2026-08-19, filed under pods::...eoInfo(3pm). slay. ✨

πŸ“¦ where this page comes from