mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Quickie: make sure the correct context is adjusted; use the intended convertPointToBacking:.
This commit is contained in:
parent
cea2580000
commit
78a91b67c5
@ -52,8 +52,10 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||
{
|
||||
[super reshape];
|
||||
|
||||
CGSize viewSize = [self convertSize:self.bounds.size toView:self];
|
||||
glViewport(0, 0, viewSize.width, viewSize.height);
|
||||
[self.openGLContext makeCurrentContext];
|
||||
NSPoint backingSize = {.x = self.bounds.size.width, .y = self.bounds.size.height};
|
||||
NSPoint viewSize = [self convertPointToBacking:backingSize];
|
||||
glViewport(0, 0, viewSize.x, viewSize.y);
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect
|
||||
|
Loading…
Reference in New Issue
Block a user