Commit 267fb63
Fix CA::MetalLayer undeclared in C++ TUs via forward declaration
<QuartzCore/CAMetalLayer.h> only defines an Objective-C @interface, not
the C++ CA::MetalLayer class from Metal-cpp. BabylonNative.cpp is compiled
as a pure C++ translation unit, so including that header does not make the
CA:: namespace visible.
Replace the include with a C++ forward declaration:
namespace CA { class MetalLayer; }
This is sufficient for the pointer type alias in the header.
The full definition is provided by the Metal-cpp headers that BabylonNative
itself brings in when the implementation files are compiled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8721561 commit 267fb63
1 file changed
Lines changed: 4 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
0 commit comments