Skip to content

alaingalvan/metal-seed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Cover Art

Metal Seed

cmake-img License

A Metal repo you can use to get started with your own renderer.

Setup

First install:

Then type the following in your terminal.

# πŸ‘ Clone the repo
git clone https://github.com/alaingalvan/metal-seed --recurse-submodules

# πŸ’Ώ go inside the folder
cd metal-seed

# πŸ‘― If you forget to `recurse-submodules` you can always run:
git submodule update --init

# πŸ‘· Make a build folder
mkdir build
cd build

# 🍎 To build your XCode project on Mac OS
cmake .. -G Xcode

# πŸ“± To build your XCode project targeting iOS / iPad OS
cmake .. -G Xcode -DCMAKE_SYSTEM_NAME=iOS

# πŸ”¨ Build project
cmake --build .

Refer to this blog post on designing C++ libraries and apps for more details on CMake, Git Submodules, etc.

Project Layout

As your project becomes more complex, you'll want to separate files and organize your application to something more akin to a game or renderer, check out this post on game engine architecture and this one on real time renderer architecture for more details.

β”œβ”€ πŸ“‚ external/                    # πŸ‘Ά Dependencies
β”‚  β”œβ”€ πŸ“ crosswindow/                    # πŸ–ΌοΈ OS Windows
β”‚  β”œβ”€ πŸ“ crosswindow-graphics/           # 🎨 Metal Layer Creation
β”‚  └─ πŸ“ glm/                            # βž• Linear Algebra
β”œβ”€ πŸ“‚ src/                         # 🌟 Source Files
β”‚  β”œβ”€ πŸ“„ Utils.h                         # βš™οΈ Utilities (Load Files, Check Shaders, etc.)
β”‚  β”œβ”€ πŸ“„ Renderer.h                      # πŸ”Ί Triangle Draw Code
β”‚  β”œβ”€ πŸ“„ Renderer.mm                     # -
β”‚  └─ πŸ“„ Main.mm                         # 🏁 Application Main
β”œβ”€ πŸ“„ .gitignore                   # πŸ‘οΈ Ignore certain files in git repo
β”œβ”€ πŸ“„ CMakeLists.txt               # πŸ”¨ Build Script
β”œβ”€ πŸ“„ license.md                   # βš–οΈ Your License (Unlicense)
└─ πŸ“ƒreadme.md                     # πŸ“– Read Me!

About

πŸ€–πŸŒ± An Apple Metal starter repo that you could use to get the ball rolling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published