踩了一天的坑,记录下,网上相关资料也很少,主要问题在macos上windows的资料网上全
首先包含必要的头文件
1 |
接着需要获取CAMetalLayer,这里就很关键了
1 | // 获取 NSWindow 对象 |
最后一步,创建vkSurface
1 | //wsi.get_surfac就是刚才返回的layer,只不过被转换成了void* |
相关代码
https://github.com/lamouse/graphics
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true