[Metaballs] Do not commit too early
This commit is contained in:
parent
0875028e48
commit
d8c319bd9b
1 changed files with 2 additions and 1 deletions
|
@ -87,9 +87,10 @@ class Renderer: NSObject, MTKViewDelegate {
|
||||||
]
|
]
|
||||||
|
|
||||||
let buffer = commandQueue.makeCommandBuffer()
|
let buffer = commandQueue.makeCommandBuffer()
|
||||||
|
buffer.label = "Compute + Render"
|
||||||
|
|
||||||
do {
|
do {
|
||||||
let _ = try field.computeEncoderForSamplingKernel(withDevice: device, commandBuffer: buffer)
|
let _ = try field.computeEncoderForSamplingKernel(withDevice: device, commandBuffer: buffer)
|
||||||
buffer.commit()
|
|
||||||
} catch let e {
|
} catch let e {
|
||||||
print("\(e)")
|
print("\(e)")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue