SDL2-FFI
view release on metacpan or search on metacpan
lib/SDL2/hints.pm view on Meta::CPAN
0 disable 3D acceleration
1 enable 3D acceleration, using the default renderer
X enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
By default SDL tries to make a best guess whether to use acceleration or not on
each platform.
SDL can try to accelerate the screen surface returned by
L<SDL_GetWindowSurface( ... )|SDL2/SDL_GetWindowSurface( ... )> by using
streaming textures with a 3D rendering engine. This variable controls whether
and how this is done.
=item C<SDL_HINT_GAMECONTROLLERCONFIG>
A variable that lets you provide a file with extra gamecontroller db entries.
This hint must be set before calling C<SDL_Init(SDL_INIT_GAMECONTROLLER)>.
You can update mappings after the system is initialized with
C<SDL_GameControllerMappingForGUID( )> and C<SDL_GameControllerAddMapping( )>.
lib/SDL2/render.pm view on Meta::CPAN
SDL_UpdateTexture( $texture, $rect, $surface->pixels, $surface->pitch );
The pixel data must be in the pixel format of the texture. Use L<<
C<SDL_QueryTexture( ... )>|/C<SDL_QueryTexture( ... )> >> to query the pixel
format of the texture.
This is a fairly slow function, intended for use with static textures that do
not change often.
If the texture is intended to be updated often, it is preferred to create the
texture as streaming and use the locking functions referenced below. While this
function will work with streaming textures, for optimization reasons you may
not get the pixels back if you lock the texture afterward.
Expected parameters include:
=over
=item C<texture> - the texture to update
=item C<rect> - an L<SDL2::Rect> structure representing the area to update, or undef to update the entire texture
( run in 0.363 second using v1.01-cache-2.11-cpan-4d50c553e7e )