include/SDL_metal.h


Log

Author Commit Date CI Message
Sam Lantinga 0479df53 2023-01-09T09:48:21 Updated copyright for 2023
Kamil Ševeček 31991ab8 2022-10-07T15:45:28 Fix \sa to a valid function in SDL_metal.h.
SDL Wiki Bot 7ba4d24c 2022-03-27T16:49:05 Sync wiki -> header
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
SDL Wiki Bot c7dafb15 2021-10-27T01:36:05 Sync wiki -> header
Ryan C. Gordon c88eb7a8 2021-07-14T17:07:04 Sync wiki -> header.
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Ryan C. Gordon a7916890 2020-04-10T00:37:35 metal: Added some support interfaces to Apple's Metal API (thanks, Caleb!). Caleb Cornett's comments: "A few weeks ago, Alex added a partial Metal API to SDL2: https://hg.libsdl.org/SDL/rev/22c8e7cd8d38 I noticed it was missing a few features that would help Metal become a first-class citizen in SDL, so I went ahead and wrote them! Here are the new APIs: 1. SDL_WINDOW_METAL flag for SDL_CreateWindow(). This allows the programmer to specify that they intend to create a window for use with SDL_MetalView. The flag is used to ensure correct usage of the API and to prevent accidentally defaulting to OpenGL on iOS. 2. SDL_Metal_GetLayer(). This function takes a SDL_MetalView and returns a pointer to the view's backing CAMetalLayer. This simplifies things considerably, since in the current version of the SDL_Metal API the programmer is required to bridge-cast a SDL_MetalView handle to an NSView or UIView (depending on the platform) and then extract the layer from there. SDL_Metal_GetLayer automatically handles all of that, making the operation simple and cross-platform. 3. SDL_Metal_GetDrawableSize(). This function already exists in the current SDL_Metal API (and is used behind-the-scenes for SDL_Vulkan_GetDrawableSize on Apple platforms) but was not publicly exposed. My patch exposes this function for public use. It works just like you'd expect. Tested on macOS 10.14 and iOS 12.4." Fixes Bugzilla #4796.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Alex Szpakowski aebaa316 2019-08-05T12:35:32 Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.