mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Fixes sizing of buffers to the current output.
This commit is contained in:
@@ -296,15 +296,15 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
|
|||||||
[self setAspectRatio];
|
[self setAspectRatio];
|
||||||
|
|
||||||
@synchronized(self) {
|
@synchronized(self) {
|
||||||
[self updateSizeBuffers];
|
[self updateSizeBuffersToSize:size];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateSizeBuffers {
|
- (void)updateSizeBuffersToSize:(CGSize)size {
|
||||||
// TODO: consider multisampling here? But it seems like you'd need another level of indirection
|
// TODO: consider multisampling here? But it seems like you'd need another level of indirection
|
||||||
// in order to maintain an ongoing buffer that supersamples only at the end.
|
// in order to maintain an ongoing buffer that supersamples only at the end.
|
||||||
const NSUInteger frameBufferWidth = NSUInteger(_view.drawableSize.width * _view.layer.contentsScale);
|
const NSUInteger frameBufferWidth = NSUInteger(size.width * _view.layer.contentsScale);
|
||||||
const NSUInteger frameBufferHeight = NSUInteger(_view.drawableSize.height * _view.layer.contentsScale);
|
const NSUInteger frameBufferHeight = NSUInteger(size.height * _view.layer.contentsScale);
|
||||||
|
|
||||||
// Generate a framebuffer and a stencil.
|
// Generate a framebuffer and a stencil.
|
||||||
MTLTextureDescriptor *const textureDescriptor = [MTLTextureDescriptor
|
MTLTextureDescriptor *const textureDescriptor = [MTLTextureDescriptor
|
||||||
|
Reference in New Issue
Block a user