Skip to content

Fix Metal backend and macOS build setup#37

Closed
TurboSwin wants to merge 2 commits into
ElectroZybr:mainfrom
TurboSwin:main
Closed

Fix Metal backend and macOS build setup#37
TurboSwin wants to merge 2 commits into
ElectroZybr:mainfrom
TurboSwin:main

Conversation

@TurboSwin
Copy link
Copy Markdown
Contributor

Add Rendering/MetalBackend.h and MetalBackend.mm which create a CAMetalLayer from a GLFW window (getMetalBackend). Update WGPUContext to use getMetalBackend for wgpu::SurfaceSourceMetalLayer instead of using the NSWindow directly. Modify CMakeLists to include the Metal backend source/header in the library, add APPLE-specific target_sources and link Cocoa/Metal/QuartzCore frameworks (using find_library and -framework flags). Also add a minor include fix in Engine/math/Vec2.h (include <stdlib.h>).

Add Rendering/MetalBackend.h and MetalBackend.mm which create a CAMetalLayer from a GLFW window (getMetalBackend). Update WGPUContext to use getMetalBackend for wgpu::SurfaceSourceMetalLayer instead of using the NSWindow directly. Modify CMakeLists to include the Metal backend source/header in the library, add APPLE-specific target_sources and link Cocoa/Metal/QuartzCore frameworks (using find_library and -framework flags). Also add a minor include fix in Engine/math/Vec2.h (include <stdlib.h>).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants