Release of the multimedia library SDL 3.4.0

The SDL 3.4.0 (Simple DirectMedia Layer) library has been released. This library aims to simplify the development of games and multimedia applications, providing features such as hardware-accelerated output for 2D and 3D graphics, input processing, sound playback, and 3D output via OpenGL, OpenGL ES, Metal, Direct3D, or Vulkan. The code is written in C and distributed under the Zlib license. Wrappers are provided for using SDL in projects written in various programming languages.

SDL 3.4.0 is the second major stable branch in the SDL 3.x series — the first stable branch was the 3.2.x series, while the 3.3.x branch was positioned as experimental. The main changes in SDL 3.4.0 relate to improved portability between 3D GPU APIs and 2D rendering APIs, expanded support for building in WebAssembly using the Emscripten compiler, enhancements for working with graphic tablets and digital pens, and the introduction of built-in support for PNG image formats.

Among the new features in SDL 3.4.0:

  • Built-in support for PNG images has been added, with functions SDL_LoadPNG(), SDL_LoadPNG_IO(), SDL_SavePNG(), and SDL_SavePNG_IO() to work with them. Functions SDL_LoadSurface() and SDL_LoadSurface_IO() have been added to determine the format (PNG or BMP) and load images as surfaces.
  • The function SDL_RotateSurface() has been added to create a rotated copy of a surface.
  • The function SDL_CreateAnimatedCursor() has been added to create colored animated cursors, along with the SDL_HINT_MOUSE_DPI_SCALE_CURSORS hint for automatic scaling of cursors relative to the screen scaling level.
  • Functions SDL_SetWindowProgressState(), SDL_SetWindowProgressValue(), SDL_GetWindowProgressState(), and SDL_GetWindowProgressValue() have been added to display the progress of an operation in the application's taskbar icon.
  • Properties for using GPU APIs with legacy hardware have been added.
  • The property SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER and SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN have been added to configure and utilize Vulkan API capabilities when creating GPU devices.
  • The function SDL_GetGPUDeviceProperties() has been added to query information about the GPU.
  • Functions SDL_CreateGPURenderer() and SDL_GetGPURendererDevice() have been added to utilize the GPU for 2D rendering, along with SDL_SetGPURenderStateFragmentUniforms(), SDL_SetGPURenderState(), and SDL_DestroyGPURenderState() for enabling fragment shaders in 2D rendering.
  • 2D rendering through the GPU now supports YUV textures and HDR. Texture palette support has been added, along with functions SDL_GetTexturePalette() and SDL_SetTexturePalette() for working with them. Functions SDL_GetPixelFormatFromGPUTextureFormat() and SDL_GetGPUTextureFormatFromPixelFormat() were introduced for texture format conversion, as well as parameters SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER and SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER for creating 2D textures from GPU textures. Texture settings functions SDL_RenderTexture9GridTiled(), SDL_GetDefaultTextureScaleMode(), SDL_SetDefaultTextureScaleMode(), SDL_GetRenderTextureAddressMode(), and SDL_SetRenderTextureAddressMode() have been added.
  • The parameter SDL_SCALEMODE_PIXELART has been added to utilize a pixel art optimized scaling algorithm.
  • Events SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED, SDL_EVENT_SCREEN_KEYBOARD_SHOWN, SDL_EVENT_SCREEN_KEYBOARD_HIDDEN, SDL_EVENT_PINCH_BEGIN, SDL_EVENT_PINCH_UPDATE, SDL_EVENT_PINCH_END, and SDL_EVENT_AUDIO_DEVICE_ADDED have been implemented, triggering upon changes in boundaries, the showing/ hiding of the on-screen keyboard, screen gestures, and the addition of audio devices.
  • Functions SDL_PutAudioStreamDataNoCopy() and SDL_PutAudioStreamPlanarData() have been introduced for more efficient audio stream processing.
  • Support for Nintendo Switch 2 game controllers connected via USB has been added. Support for 8BitDo, FlyDigi, and Hand Held Legend SInput controllers has been expanded.
  • To enhance the functionality of WebAssembly applications compiled with Emscripten, the function SDL_SetWindowFillDocument() has been added, along with parameters SDL_WINDOW_FILL_DOCUMENT, SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING, and SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING.
  • On the Linux platform, support for atomic operations using KMSDRM has been implemented, activated via the property SDL_HINT_KMSDRM_ATOMIC. The parameter SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER has been added to request the wl_output display device associated with the screen in Wayland-based environments.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster