Box2D Forums

It is currently Sun Sep 14, 2014 9:02 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Feb 04, 2012 12:04 pm 
Offline

Joined: Tue Jun 28, 2011 6:56 am
Posts: 20
We are trying to unify the asynchronous graphic thread to jbox2d.
Because I don't want to copy all the body position ant then send them to graphics is synchronous mode, I have taken a reference to the transform of every body and set it to the relative graphic entity, so the Transform data is share.

But this is not safe!

What can happen:
1. entity are drawn in different physic step, this will probably cause a so small difference at 50/60Hz that nobody will notice, but if graphics run at 30fps it can act weird

2. entity read Transform while it is written, maybe while a variable is inconsistent, so it will "jump" to a strange location for 1 turn

Do you have a better idea? IMHO Transform should implement some method to be easily READ in asynchronous way


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group