mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-09 21:47:57 +00:00
Metal API bug fixes
This commit is contained in:
@@ -13,7 +13,13 @@ public:
|
||||
NSPtr() = default;
|
||||
~NSPtr() {[m_ptr release];}
|
||||
NSPtr(T&& recv) : m_ptr(recv) {}
|
||||
NSPtr& operator=(T&& recv) {[m_ptr release]; m_ptr = recv; return *this;}
|
||||
NSPtr& operator=(T&& recv)
|
||||
{
|
||||
NSUInteger rc = [m_ptr retainCount];
|
||||
[m_ptr release];
|
||||
m_ptr = recv;
|
||||
return *this;
|
||||
}
|
||||
NSPtr(const NSPtr& other) = delete;
|
||||
NSPtr(NSPtr&& other) = default;
|
||||
NSPtr& operator=(const NSPtr& other) = delete;
|
||||
|
||||
@@ -884,8 +884,9 @@ static boo::ESpecialKey translateKeycode(short code)
|
||||
@implementation GraphicsContextCocoaMetalInternal
|
||||
- (id)initWithBooContext:(boo::GraphicsContextCocoaMetal*)bctx
|
||||
{
|
||||
self = [self initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
m_ctx = bctx->m_metalCtx;
|
||||
self = [self initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
[self setWantsLayer:YES];
|
||||
resp = [[BooCocoaResponder alloc] initWithBooContext:bctx View:self];
|
||||
return self;
|
||||
}
|
||||
@@ -896,11 +897,6 @@ static boo::ESpecialKey translateKeycode(short code)
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL)wantsLayer
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (CALayer*)makeBackingLayer
|
||||
{
|
||||
CAMetalLayer* layer = [CAMetalLayer new];
|
||||
|
||||
Reference in New Issue
Block a user