Swift ports of Apple's Objective-C / C++ sample code

Related tags

Image swift metal swiftui
Overview

MetalSampleCodeSwift

Swift ports of Apple's Objective-C / C++ sample code

Metal is a great API, but it can feel inaccessible for Swift developers due to all the samples being written in C++ or Objective-C.

Swift's more concise syntax and reduced boilerplate can also make the code a lot more readable.

Most game developers are coming from C++ so I understand why the samples are in C++ / Objective-C, but the goal of this project is to port all of the Metal samples so that App developers can also learn metal without such a large barrier to entry.

In the first pass only the macOS targets will be ported as the other targets add a lot of clutter, and the code is being tested on Apple Silicon and may not work on Intel.

Samples ported so far Original sample
Performing Calculations on a GPU link
Using Metal to Draw a View’s Contents link
Using a Render Pipeline to Render Primitives link
Synchronizing CPU and GPU Work link
Creating and Sampling Textures link
Calculating Primitive Visibility Using Depth Testing link
Customizing Render Pass Setup link
Encoding Indirect Command Buffers on the CPU link
Encoding Indirect Command Buffers on the GPU link
Managing groups of resources with argument buffers link
Adjusting the level of detail using Metal mesh shaders link
Accelerating ray tracing using Metal link
You might also like...
Source code for iOS app
Source code for iOS app "Photos for VK" — albums and photos manager for social network VKontakte

VK Photos (formally Photos for VK) VK Photos is an iOS app for manage albums and photos in social network VKontakte (vk.com) Screenshots Disclaimer ⚠️

A very useful and unique iOS library to open image picker in just few lines of code.
A very useful and unique iOS library to open image picker in just few lines of code.

ImagePickerEasy A very simple solution to implement UIImagePickerController() in your application. Requirements Swift 4.2 and above Installation Image

RadarKit - The Radar Kit allowing you to locate places, trip neary by you Or it will help you to search out the people around you with the few lines of code
The frontend (phone) code for the e-mission server

e-mission phone app This is the phone component of the e-mission system. ✨ This has now been upgraded to cordova [email protected] and [email protected] (details)

API surface for Swift plug-ins using the Swift Plugin Manager

SwiftPlugin The minimal API surface required for the Swift Plugin Manager to create instances from a loaded plugin. Additional documentation and refer

Contentful.swift : Swift Delivery SDK for Contentful
Contentful.swift : Swift Delivery SDK for Contentful

contentful.swift - Swift Delivery SDK for Contentful Swift SDK for the Contentfu

Swift Package Manager command plugin for Swift-DocC

Swift-DocC Plugin The Swift-DocC plugin is a Swift Package Manager command plugin that supports building documentation for SwiftPM libraries and execu

Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.
Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

BlockiesSwift - Unique blocky identicons generator for Swift
BlockiesSwift - Unique blocky identicons generator for Swift

⚗️ BlockiesSwift This library is a Swift implementation of the Ethereum fork of Blockies which is intended to be used in iOS, watchOS, tvOS and macOS

Owner
Jonathan Hobson
Former game engine programmer turned iOS developer. Swift, SwiftUI, and a dash of Metal.
Jonathan Hobson
AirPodsMotionAPI - Test Swift's AirPods Motion API in this sample project

AirPods Motion API Overview Swift provides an AirPods motion API that works on s

Pallav Agarwal 46 Oct 27, 2022
Sample app to open parking lot gates by phone calls

DouzePointCinq - Test app Sample iOS app to open parking lot gates by phone calls. Screenshots (dark & light modes) How to use Clone the project git c

Anthony You 1 Oct 29, 2021
FlightTicketBrowser - A SwiftUI sample app for flight ticket browser

FlightTicketBrowser This app is a SwiftUI sample app for flight ticket browser.

Takuya Aso 6 Nov 14, 2022
BeatboxiOS - A sample implementation for merging multiple video files and/or image files using AVFoundation

MergeVideos This is a sample implementation for merging multiple video files and

null 3 Oct 24, 2022
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

null 8.3k Nov 25, 2022
A simple macOS app to read code from images, written purely in Swift using Vision Framework.

CodeReader A simple macOS app to read code from images, written purely in Swift using Vision Framework. Usage Drag an image Click the convert button R

Md Ibrahim Hassan 44 Nov 20, 2022
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.

EFQRCode is a lightweight, pure-Swift library for generating stylized QRCode images with watermark or icon, and for recognizing QRCode from images, in

EFPrefix 4.3k Nov 15, 2022
Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.

PassportScanner Works with 2 and 3 line identity documents. What is this With PassportScanner you can use your camera to scan the MRZ code of a passpo

Edwin Vermeer 439 Oct 27, 2022
Code examples for Depth APIs in iOS

iOS-Depth-Sampler Code examples of Depth APIs in iOS Requirement Use devices which has a dual camera (e.g. iPhone 8 Plus) or a TrueDepth camera (e.g.

Shuichi Tsutsumi 1.1k Nov 17, 2022
Source code for the iOS app Screenshotter, on the App Store

Screenshotter This is the source code for the iOS app Screenshotter, available on the App Store. General Project Info Screenshotter is an Objective C

Riz 94 Mar 25, 2022