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
-
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
SharedArrayBuffer
in theTripleBuffer
to update the matrix of a mesh, but what about updating the material? Or the visibility?Example:
If I update
ColorComponent
to "red", how does the renderer know to display the material in red? Does theColorSystem
have to update the triple buffer? Is everything store in theSharedArrayBuffer
? The same withVisibleComponent
: Is thevisible
value ofObject3D
also stored in the buffer?Beta Was this translation helpful? Give feedback.
All reactions