mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
samples: fix rendering stopped when changing worker count or type
This commit is contained in:
parent
2bd76e2da5
commit
f3bf9d812f
2844
samples/kotlin-js-store/yarn.lock
Normal file
2844
samples/kotlin-js-store/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -102,12 +102,14 @@ class Controller(
|
|||
})
|
||||
}
|
||||
onRenderComplete = { index, buffer ->
|
||||
buffers[index] = buffer
|
||||
if (--pending == 0) {
|
||||
performanceMeasure.endFrame()
|
||||
Window.requestAnimationFrame {
|
||||
displayBuffers(buffers)
|
||||
renderFrame()
|
||||
if (buffers[index] == null) {
|
||||
buffers[index] = buffer
|
||||
if (--pending == 0) {
|
||||
performanceMeasure.endFrame()
|
||||
Window.requestAnimationFrame {
|
||||
displayBuffers(buffers)
|
||||
renderFrame()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user