Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Lock VertexData For Mesh missing parameter?

Author
Message
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 13th Mar 2010 19:29
The help documentation under "Description" for the LOCK VERTEXDATA FOR MESH command suggests that it's missing a lock mode parameter like LOCK VERTEX DATA FOR LIMB.

I checked the exported function name in depends and it resolves to: void LockVertexDataForMesh(int), suggesting that there isn't a parameter.

Is this an oversight in the documentation or the exported function?

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Mar 2010 20:25
It's a mistake in the help file - it was probably a copy/paste directly from the LOCK VERTEXDATA FOR LIMB help.

The extra parameter on LOCK VERTEXDATA FOR LIMB is used to tell DBPro how it wants the object to be updated ready for it to be displayed. There is no such need for meshes.

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 13th Mar 2010 21:56 Edited at: 13th Mar 2010 21:58
I still don't fully understand what the lock mode parameter does. I took my best guess while trying to clarify the documentation on this parameter but I may have gotten it wrong.

Can you confirm any of my revisions?

Quote: " This command will copy the vertex data of the target limb to a buffer, allowing it to be modified by the vertex commands. Changes made while to the buffer will not take effect until it has been unlocked.

If 'LockMode' is set to 0 then a copy of the target limb's mesh will be copied to the buffer.

If 'LockMode' is set to 1 then only the changes between the limb's mesh and the buffer are updated. This can be considerably faster than copying the entire contents of the buffer.

If 'LockMode' is set to 2 then perform a complete copy of the limb's mesh to the buffer. It will also ensure the any changes made between the buffer and the limb itself will be updated as well."


What lock mode 2 is doing, I think, is updating the limb with the difference between the buffer and the mesh data. Sort of like doing an unlock/lock in one command. I'm not sure if that's right though.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Mar 2010 00:21
Lock modes 1 & 2 are identical, except that changes made in lock mode 2 are used to permanently update the object - this allows you to save the changes when you save out to a .dbo, but it is very slightly slower.

Login to post a reply

Server time is: 2024-03-28 20:34:40
Your offset time is: 2024-03-28 20:34:40