1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Quickie: make sure the correct context is adjusted; use the intended convertPointToBacking:.

This commit is contained in:
Thomas Harte 2015-07-24 23:42:19 -04:00
parent cea2580000
commit 78a91b67c5

View File

@ -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