Trying to better understand render <-> game thread updates #535
benjaminsuch
started this conversation in
General
Replies: 1 comment
-
|
I digged a bit deeper and found out that most happens in
Is that correct so far or did I miss something important? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys!
First of all, I want to congratulate you for this really nice engine. It's really interesting to read the code and understand the architecture behind it. One thing I still have a hard time to really understand is how the render thread updates the scene based on information coming from the game thread. How does a system on the game thread tells the renderer to update a mesh? I see you use
SharedArrayBufferin theTripleBufferto update the matrix of a mesh, but what about updating the material? Or the visibility?Example:
If I update
ColorComponentto "red", how does the renderer know to display the material in red? Does theColorSystemhave to update the triple buffer? Is everything store in theSharedArrayBuffer? The same withVisibleComponent: Is thevisiblevalue ofObject3Dalso stored in the buffer?Beta Was this translation helpful? Give feedback.
All reactions