SDL3
view release on metacpan or search on metacpan
to audio, keyboard, mouse, joystick, and graphics hardware.
This is very much still under construction. There are a few examples in this distribution's `eg/` directory but a few
games and other demos I've written may be found on github: [https://github.com/sanko/SDL3.pm-demos](https://github.com/sanko/SDL3.pm-demos).
## Features
Each feature listed below is a tag you may use.
### `:all`
This binds all functions, defines all types, and imports them into your package.
See [the SDL3 Wiki](https://wiki.libsdl.org/SDL3/FrontPage) for documentation of the hundreds of types and functions
you'll have access to with this import tag.
### `:asyncio` - Async I/O
SDL offers a way to perform I/O asynchronously. This allows an app to read or write files without waiting for data to
actually transfer; the functions that request I/O never block while the request is fulfilled.
See [SDL3: CategoryAsyncIO](https://wiki.libsdl.org/SDL3/CategoryAsyncIO)
### `:atomic` - Atomic Operations
Atomic operations.
IMPORTANT: If you are not an expert in concurrent lockless programming, you should not be using any functions in this
file. You should be protecting your data structures with full mutexes instead.
See [SDL3: CategoryAtomic](https://wiki.libsdl.org/SDL3/CategoryAtomic)
### `:audio` - Audio Playback, Recording, and Mixing
Audio functionality for the SDL library.
All audio in SDL3 revolves around `SDL_AudioStream`. Whether you want to play or record audio, convert it, stream it,
buffer it, or mix it, you're going to be passing it through an audio stream.
See [SDL3: CategoryAudio](https://wiki.libsdl.org/SDL3/CategoryAudio)
### `:bits` - CategoryBlendmode
Functions for fiddling with bits and bitmasks.
See [SDL3: CategoryBits](https://wiki.libsdl.org/SDL3/CategoryBits)
### `:blendmode` - Blend modes
Blend modes decide how two colors will mix together. There are both standard modes for basic needs and a means to
create custom modes, dictating what sort of math to do on what color components.
See [SDL3: CategoryBlendmode](https://wiki.libsdl.org/SDL3/CategoryBlendmode)
### `:camera` - Camera Support
Video capture for the SDL library.
See [SDL3: CategoryCamera](https://wiki.libsdl.org/SDL3/CategoryCamera)
### `:clipboard` - Clipboard Handling
SDL provides access to the system clipboard, both for reading information from other processes and publishing
information of its own.
This is not just text! SDL apps can access and publish data by mimetype.
See [SDL3: CategoryClipboard](https://wiki.libsdl.org/SDL3/CategoryClipboard)
### `:cpuinfo` - CPU Feature Detection
CPU feature detection for SDL.
These functions are largely concerned with reporting if the system has access to various SIMD instruction sets, but
also has other important info to share, such as system RAM size and number of logical CPU cores.
See [SDL3: CategoryCPUInfo](https://wiki.libsdl.org/SDL3/CategoryCPUInfo)
### `:dialog` - File Dialogs
File dialog support.
SDL offers file dialogs, to let users select files with native GUI interfaces. There are "open" dialogs, "save"
dialogs, and folder selection dialogs. The app can control some details, such as filtering to specific files, or
whether multiple files can be selected by the user.
Note that launching a file dialog is a non-blocking operation; control returns to the app immediately, and a callback
is called later (possibly in another thread) when the user makes a choice.
See [SDL3: CategoryDialog](https://wiki.libsdl.org/SDL3/CategoryDialog)
### `:error` - Error Handling
Simple error message routines for SDL.
Most apps will interface with these APIs in exactly one function: when almost any SDL function call reports failure,
you can get a human-readable string of the problem from [SDL\_GetError()](https://wiki.libsdl.org/SDL3/SDL_GetError).
See [SDL3: CategoryError](https://wiki.libsdl.org/SDL3/CategoryError)
### `:events` - Event Handling
Event queue management.
See [SDL3: CategoryEvents](https://wiki.libsdl.org/SDL3/CategoryEvents)
### `:filesystem` - Filesystem Access
SDL offers an API for examining and manipulating the system's filesystem. This covers most things one would need to do
with directories, except for actual file I/O.
See [SDL3: CategoryFilesystem](https://wiki.libsdl.org/SDL3/CategoryFilesystem)
### `:gamepad` - Gamepad Support
SDL provides a low-level joystick API, which just treats joysticks as an arbitrary pile of buttons, axes, and hat
switches. If you're planning to write your own control configuration screen, this can give you a lot of flexibility,
but that's a lot of work, and most things that we consider "joysticks" now are actually console-style gamepads. So SDL
provides the gamepad API on top of the lower-level joystick functionality.
See [SDL3: CategoryGamepad](https://wiki.libsdl.org/SDL3/CategoryGamepad)
### `:gpu` - 3D Rendering and GPU Compute
( run in 1.296 second using v1.01-cache-2.11-cpan-2398b32b56e )