1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +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]; [super reshape];
CGSize viewSize = [self convertSize:self.bounds.size toView:self]; [self.openGLContext makeCurrentContext];
glViewport(0, 0, viewSize.width, viewSize.height); 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 - (void)drawRect:(NSRect)dirtyRect