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 platform Windows Improved detection of relative mouse movement in Windows Remote Desktop. Added the SDL_HINT_IME_SHOW_UI flag to show native UI components (hidden by default). For UWP apps, WGI has been used instead of XInput to improve support for input controllers.
- For platform Linux The following features have been implemented: SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME for binding the actions displayed when the screensaver is disabled; SDL_HINT_LINUX_JOYSTICK_CLASSIC for selecting which of the devices (/dev/input/js* or /dev/input/event*) to use for the joystick; SDL_HINT_JOYSTICK_DEVICE for setting the device opened for the joystick. The SDL_ function has been added.LinuxSetThreadPriorityAndPolicy() to control the priority setting for threads.
- For platform Android Support for audio output and capture using the AAudio API has been implemented. Support for the Steam Controller is disabled by default (the SDL_HINT_JOYSTICK_HIDAPI_STEAM flag has been proposed for enabling it).
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
