Replace RenderWindow with swapchains
This commit is contained in:
committed by
Jérôme Leclercq
parent
8db1c04568
commit
18851c9185
@@ -4,13 +4,17 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
id CreateAndAttachMetalLayer(void* window) {
|
||||
NSWindow* obj = (__bridge NSWindow*)window;
|
||||
id CreateAndAttachMetalLayer(void* window)
|
||||
{
|
||||
NSWindow* obj = (__bridge NSWindow*) window;
|
||||
|
||||
NSView* view = [[NSView alloc] initWithFrame:obj.frame];
|
||||
[view setLayer:[CAMetalLayer layer]];
|
||||
[view setWantsLayer:YES];
|
||||
view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
|
||||
[obj.contentView addSubview:view];
|
||||
|
||||
return view.layer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user