Lowered view sample count to improve the rendering speed on high dpi displays.

master
Yuval Dolev 2020-01-14 17:21:03 +02:00
parent de9fc34c3e
commit 1ab40ff5b9
2 changed files with 0 additions and 2 deletions

View File

@ -223,7 +223,6 @@ metal__make_buffer(u32 size, id<MTLDevice> device){
pipeline_state_descriptor.vertexFunction = vertex_function; pipeline_state_descriptor.vertexFunction = vertex_function;
pipeline_state_descriptor.fragmentFunction = fragment_function; pipeline_state_descriptor.fragmentFunction = fragment_function;
pipeline_state_descriptor.vertexDescriptor = vertexDescriptor; pipeline_state_descriptor.vertexDescriptor = vertexDescriptor;
pipeline_state_descriptor.sampleCount = mtk_view.sampleCount;
pipeline_state_descriptor.colorAttachments[0].pixelFormat = mtk_view.colorPixelFormat; pipeline_state_descriptor.colorAttachments[0].pixelFormat = mtk_view.colorPixelFormat;
pipeline_state_descriptor.colorAttachments[0].blendingEnabled = YES; pipeline_state_descriptor.colorAttachments[0].blendingEnabled = YES;
pipeline_state_descriptor.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd; pipeline_state_descriptor.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd;

View File

@ -56,7 +56,6 @@ mac_metal__init(NSWindow *window, Render_Target *target){
[metal->view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [metal->view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[metal->view setPaused:YES]; [metal->view setPaused:YES];
[metal->view setEnableSetNeedsDisplay:NO]; [metal->view setEnableSetNeedsDisplay:NO];
[metal->view setSampleCount:4];
metal->view.device = MTLCreateSystemDefaultDevice(); metal->view.device = MTLCreateSystemDefaultDevice();