Thirty Days of Metal—Day 1: Devices
This series of posts is my attempt to present the Metal graphics programming framework in small, bite-sized chunks for Swift app developers…
medium.com
요약: 디바이스는 기기의 실제 GPU를 추상화한 것이다.
Welecome to Metal!
메탈은 프로그램이 애플 기기 위에서 GPU를 구동시키게 해주는 API이다.
이 시리즈에서는 메탈 API를 게임과 같은 실시간 상호작용 앱 제작에 중점해 학습한다.
하지만, Metal을 배워 둠으로써 추후에 ML, 데이터 시각화, 물리 시뮬레이션에 도움이 된다.
다른 그래픽 프레임워크와 달리, 메탈은 Low-Level 지식이 필요하다.
⇒ 세마포어(동기화 문제), 기하와 백터, 행렬, Unmanaged Memory 등등…
Devices
메탈에서 디바이스라고 부르는 것은 애플 기기에서 실제로 존재하는 GPU를 추상화한 것이다.
코드 상에서 MTLDevice
라는 프로토콜로 부를 수 있다. MTLDevice 프로토콜은 GPU 자원 할당 메서드를 포함한다.
- 실제 메탈 디바이스를 불러오는 메서드
MTLCreaeSystemDefaultDevice()
코드
메탈 디바이스를 부르고 사용해보기
'Metal > Thirty Days of Metal (Warren Moore)' 카테고리의 다른 글
Day6. Pipelines + CommandEncoder (0) | 2023.07.21 |
---|---|
Day5. Shaders (0) | 2022.12.04 |
Day4. MTKView (0) | 2022.12.04 |
Day2. Buffers (0) | 2022.11.17 |
Day3. Commands (0) | 2022.11.17 |
댓글