How to [SAFELY] read from an instance of class in one thread, and write to it with another thread in C++?
I am attempting to create a multiplayer game in C++ with OpenGL.
Data received by the client is handled in one thread, and when I receive new information about the position of the other players, I need to write the new vertexArray into my GL buffers, which are owned by the main thread.
I have the following code in my main thread: