-
Notifications
You must be signed in to change notification settings - Fork 999
Buffer Locked but not Unlocked by Model::Clone() #2854
Comments
There's no reason to use |
Is that a "will never work" or a "generally won't work but with certain drivers may work"? If the former, we should probably just remove the else branches and just log the error. |
In OpenGL Urho3D there is literally no GPU memory access, upload call is performed In general, And even if
It may be the opposite, btw. "Generally won't work, will crash your Driver/OS with certain drivers" |
Marking this stale since there has been no activity for 30 days. |
When a Model is cloned and the vertex/index buffers are not shadowed, the function attempts to lock the buffer and copy the data that way. Let's ignore for now that this violates the documentation of the
Lock()
functions that it is for write-only (/// Lock the buffer for write-only editing. Return data pointer if successful. Optionally discard data outside the range.
). The method neverUnlock()
s the buffers, which could cause problems down the line, I imagine (I've not tested this).https://github.com/urho3d/Urho3D/blob/900611ceeb05e20cedef707bcb6a2e4ac48fb4e1/Source/Urho3D/Graphics/Model.cpp#L645-L651
https://github.com/urho3d/Urho3D/blob/900611ceeb05e20cedef707bcb6a2e4ac48fb4e1/Source/Urho3D/Graphics/Model.cpp#L673-L679
The text was updated successfully, but these errors were encountered: