Last active
April 7, 2019 18:30
-
Save barbulescualex/666ae6959f2f00ed15e261c916ddbc49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
func draw(in view: MTKView) { | |
//Creating the commandBuffer for the queue | |
guard let commandBuffer = metalCommandQueue.makeCommandBuffer() else {return} | |
//Creating the interface for the pipeline | |
guard let renderDescriptor = view.currentRenderPassDescriptor else {return} | |
//Setting a "background color" | |
renderDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(0, 0, 1, 1) | |
} |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment