NAME

SDL2::Window - Information About the Version of SDL in Use

SYNOPSIS

use SDL2 qw[:all];
SDL_Init(SDL_INIT_VIDEO);    # Initialize SDL2

# Create an application window with the following settings;
my $window = SDL_CreateWindow(
    'An SDL2 window',           # window title
    SDL_WINDOWPOS_UNDEFINED,    # initial x position
    SDL_WINDOWPOS_UNDEFINED,    # initial y position
    640,                        # width, in pixels
    480,                        # height, in pixels
    SDL_WINDOW_OPENGL           # flags
);

# Check that the window was successfully created
exit printf 'Could not create window: %s', SDL_GetError() if !defined $window;

# The window is open: could enter program loop here (see SDL__PollEvent())
sleep 5;                       # Pause execution for 5 secconds, for example
SDL_DestroyWindow($window);    # Close and destory the window
SDL_Quit();                    # Clean up
exit;

DESCRIPTION

SDL2::Window

AUTHOR

Sanko Robinson <sanko@cpan.org>