Recent

Author Topic: Metal Framework for MacOS  (Read 3219 times)

ChrisR

  • Jr. Member
  • **
  • Posts: 83
Metal Framework for MacOS
« on: August 22, 2018, 04:09:07 pm »
I have created a few Lazarus projects that can be compiled for Apple's new Metal API.
  https://github.com/neurolabusc/Metal-Demos
Most of these projects can also be compiled to support OpenGL 3.3 Core - providing support for Windows, Linux and older Macs. By keeping a thin layer for either OpenGL or Metal, one can retain most of Lazarus' "write once, compile everywhere" magic.

  The documentation is sparse, but both the main page and the line project include some useful information
  https://github.com/neurolabusc/Metal-Demos/tree/master/lines

The Metal support uses Ryan Joseph's lazmetalcontrol
  https://github.com/genericptr/Metal-Framework
My examples all use Lazarus. However, Ryan's repository also includes some examples of how to use Metal directly from freepascal without Lazarus.

Ryan deserves incredible credit - has framework provides a great a very simple way to use this powerful but complex API.