SDL 2.0.18 Media Library Release

The SDL 2.0.18 (Simple DirectMedia Layer) library, aimed at simplifying the writing of games and multimedia applications, has been released. The SDL library provides facilities such as hardware-accelerated 2D and 3D graphics output, input processing, audio playback, 3D output via OpenGL/OpenGL ES/Vulkan, and many other related operations. The library is written in C and distributed under the zlib license. Bindings are provided for using SDL capabilities in projects in various programming languages. The library code is distributed under the Zlib license.

In the new release:

  • For each function, information is provided about the SDL version in which the function appeared. Automatic synchronization of wiki documentation with header files is provided.
  • New features added:
    • SDL_RenderGeometry() and SDL_RenderGeometryRaw() for rendering arbitrary shapes using the 2D Render API.
    • SDL_SetTextureUserData() and SDL_GetTextureUserData() to bind application data to a texture.
    • SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() to convert between window coordinates and logical render coordinates.
    • SDL_RenderSetVSync() to enable output synchronization with vertical blanking pulse (vblank).
    • SDL_PremultiplyAlpha() to apply transparency to blocks of pixels in the SDL_PIXELFORMAT_ARGB8888 format.
    • SDL_SetWindowMouseRect() and SDL_GetWindowMouseRect() to limit mouse cursor movement to a specified area of ​​the window.
    • SDL_GameControllerHasRumble(), SDL_GameControllerHasRumbleTriggers(), SDL_JoystickHasRumble() and SDL_JoystickHasRumbleTriggers() to check whether the game controller and joystick support the adaptive vibration effect (rumble)
    • SDL_GetWindowICCProfile() to get the ICC color profile of the window (the SDL_WINDOWEVENT_ICCPROF_CHANGED event is proposed to check for profile changes).
  • New attributes have been added: SDL_HINT_APP_NAME to convey information about the application name and SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY to enable transparency for EGL windows.
  • Added a new window event, SDL_WINDOWEVENT_DISPLAY_CHANGED, which is generated when the screen on which the window is shown changes.
  • It is possible to define the exact parameters of the mouse wheel movement using the β€œpreciseX” and β€œpreciseY” fields in the event parameters.
  • The SDL_WaitEvent() function has been redesigned to reduce CPU load.
  • The hidapi API has been moved to the public category and is now available through the SDL_hidapi.h header file.
  • On the Windows platform, improved detection of relative mouse movement in Windows Remote Desktop. Added SDL_HINT_IME_SHOW_UI attribute to show native interface components (hidden by default). For UWP applications, WGI is used instead of XInput to improve support for input controllers.
  • For the Linux platform, the following attributes have been implemented: SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME for binding actions displayed when the screen saver is disabled; SDL_HINT_LINUX_JOYSTICK_CLASSIC to select which device (/dev/input/js* or /dev/input/event*) to use for the joystick; SDL_HINT_JOYSTICK_DEVICE to set the device to open for the joystick. Added SDL_LinuxSetThreadPriorityAndPolicy() function to control thread prioritization.
  • For the Android platform, support for audio output and capture using the AAudio API has been implemented. By default, support for the Steam Controller is disabled (the SDL_HINT_JOYSTICK_HIDAPI_STEAM flag has been suggested for enabling).

Addition: One of the authors of SDL, Ryan Gordon (icculus), said that he plans to add a simple 3D API to SDL that supports the API capabilities of modern GPUs (Vulkan, Direct3D 12, Metal). This development will be financed by Epic Games as part of the Epic Megagrant program. Gordon submitted an application for the grant in May 2021, and two weeks ago received a positive response.

Source: opennet.ru

Add a comment