Graphics programming on macOS using C++
Graphics programming on macOS using C++
Part 1: Introduction
About the Book
When people do multi-platform graphics programming on macOS they usually use Vulkan API.
The best resources on learning Vulkan include:
- The unofficial Sascha Willems tutorial
- Alexander Overrode unofficial tutorial
- Khronos documentation
These are absolutely amazing sources of information and I still recommend them to anyone.
Writing a rendering framework is the next step and just like going through the Vulkan API details - might just not be so obvious to everyone. Also, considering small tweaks one has to deal with when starting implementation on macOS.
This brings me to my goal I put myself in front of:
I want to provide an introduction and some examples of steps one needs to take to write a Vulkan rendering framework on macOS in 2023, so that people familiar or unfamiliar with Vulkan or being pros or beginners in C++ could take advantage from.
I decided to put together some information, which otherwise you would need to find by yourself including “How to”s of:
- Installing necessary software on macOS.
- Preparing the Environment (Build systems, IDEs, and Window creation frameworks, SDK).
- Making a simple game that will rely entirely on a single command buffer. To effectively use the CPU offloading features of this API.
- Some sneak peak of how to build with CMake all official Apple Metal examples (released during WWDC 2022) so you could have a base to learn Metal in future.
Why I decided to write the book ? What value does it bring ?
- Saves time (configuration, Vulkan specific things in regard to macOS)
- Small little things that make it possible to start more
- Share my approach to writing a Vulkan framework
Did I write all of this code by myself ?
- I used helper functions from Sascha Willems examples and many other official materials from Khronos are MIT licensed code regarding Vulkan.
- I used the official Apple Metal examples released during WWDC 2022.
- I used my own rendering framework written on top of Vulkan API.
Is this book for me ?
Targets of this book are:
- Beginners of graphics development in Vulkan.
- People moving from Windows and Linux to macOS with their Vulkan projects.
- People who already went through the unofficial tutorials and want to write actual application.
Advanced users may skip most of the book and go the code directly. Beginners are advices to go through the book first.
Table of Contents
- Package Managers
- Build Systems
- Integrated Development Environments
- Window management libraries
- Graphics APIs
- Other interesting topics
Open Sourcing Mental Illness, Ltd
Changing how we talk about mental health in the tech community.https://osmihelp.org
Changing how we talk about mental health in the tech community.
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them