This repository contains the project I created whist using Swift (with SwiftUI) and Metal to create simple 3D graphics on Apple platforms. It's part of an ongoing article series in which I explore the fundamentals needed to create a 3D Rendering Pipeline in Swift.
Author’s Note: If I've made any errors, or you have a really cool way of implementing something, feel free to open an issue or leave a comment!
- Articles in This Series
- Useful Resources
- Setup & Requirements
- Feedback & Contributions
- License
- Beautiful Pictures (Development Screenshots)
Below are links to articles detailing each phase of the development process:
Bonus Article: Running Modern OpenGL on macOS: A Virtualized Ubuntu Approach
- Swift x Metal for 3D Graphics Rendering Part 1: Setting Up in SwiftUI
- Swift x Metal for 3D Graphics Rendering Part 2: Metal Shaders and Drawing A Triangle
- Swift x Metal for 3D Graphics Rendering Part 3: Vertex and Index Buffers
- Swift x Metal for 3D Graphics Rendering Part 4: Drawing 3D Shapes And The Matrix
- Swift x Metal for 3D Graphics Rendering Part 5: Drawing 3D Models From Files
- Coming One of These Days: Part 6 and More
Check back periodically or watch this repo to see when new articles are added!
- @GetIntoGameDev’s YouTube Channel
- Kodeco’s (Ray Wenderlich) Metal Courses (Paid)
- Old but FREE Kodeco Course on YouTube
- Apple’s Metal Documentation
- Metal by Tutorials book Source Code
-
Xcode
-
iOS or macOS Catalyst deployment target (my code assumes macOS Catalyst, but it can be adapted).
-
Swift 5.7 or later.
-
Clone the repository
-
Open project in XCode
-
Change the Development Team
-
Clean your build folder
-
Build and run the app
- Found a bug or have a suggestion? Open an issue or submit a pull request.
- Have a unique approach or optimization? Feel free to share by opening a PR or starting a discussion.
- Curious about a specific topic in Metal? Let me know, and I might write a dedicated article about it!
This project is available under the MIT License. Feel free to use, modify, and distribute this code for your own projects.