src/video/cocoa/SDL_cocoametalview.h


Log

Author Commit Date CI Message
Sam Lantinga 7b100001 2022-11-30T15:51:17 Reverted code formatting for Apple platforms We didn't get the merge right, and rather than tease out exactly what happened, I'm just reverting for now.
Sam Lantinga b8d85c69 2022-11-30T12:51:59 Update for SDL3 coding style (#6717) I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
slime bbeacd72 2022-10-02T22:57:03 Fix some credit comments.
Sam Lantinga 4b38d4c9 2022-01-07T12:37:28 Leave the Metal view active on the window when recreating the Metal renderer Fixes https://github.com/libsdl-org/SDL/issues/5140 Also move the metal tag definition to SDL_syswm.h so it can be used by applications
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Cameron Gutman 1b6de9a9 2020-09-05T15:01:45 Fix SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH=1 on Metal windows SDL_cocoametalview was consuming the first click rather than passing it through to the SDLView underneath which overrides [NSView acceptsFirstMouse] based on the user's SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH preference.
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 c9c89783 2020-01-29T20:09:08 Miscellaneous pending fixes
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Alex Szpakowski f8bdefe1 2019-10-13T15:18:28 macOS: Fix asserts in SDL_Render's metal scissor code when the window is resized.
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.
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Alex Szpakowski d9094421 2018-10-12T17:55:42 metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250.
Mark Callow 69958441 2018-02-21T09:58:21 Fix high-dpi support on macOS and simplify it and iOS variant. The detault drawableSize for a CAMetalLayer is its bounds x its scale. So it is sufficient to set the *layer's* scale to the desired value.
Sam Lantinga 66baf736 2018-01-03T11:31:42 Fixed spacing in copyright headers
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Alex Szpakowski 48fea0ce 2017-12-31T15:21:25 macOS: Fix MoltenVK Metal view resizing, and allow the metal view to be used without vulkan.
Sam Lantinga 8ac85744 2017-08-28T22:36:45 Fixed Vulkan configure check for Android and added one for Mac OS X
Sam Lantinga 90b38a5d 2017-08-28T22:13:45 Fixed bug 3786 - building against a Mac OS X SDK < 10.11 fails since the vulkan merge Ozkan Sezer Since the Vulkan merge, building against a Mac OS X SDM older than 10.11 fails in SDL_cocoametalview.m because Metal.framework is not present. There is no conditional compiling in SDL_cocoametalview.m either, so --disable-video-vulkan doesn't help with anything. (The configury doesn't check darwin for x86_64 either, but it's another story.) I cross-build against 10.8 SDK on linux using clang-3.4.2 and this is a problem for me. Will this be fixed?
Sam Lantinga 0d011ec6 2017-08-28T00:22:23 Renaming of guard header names to quiet -Wreserved-id-macro
Ryan C. Gordon 25e3a1ec 2017-08-27T22:15:57 vulkan: Initial Vulkan support! This work was done by Jacob Lifshay and Mark Callow; I'm just merging it into revision control.