mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +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];
|
[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
|
||||||
|
Loading…
Reference in New Issue
Block a user