Draft for fixing integer decoding #8
Draft
+4
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #5
This is only a DRAFT and likely not supposed to be merged. This is only to illustrate a ""fix"" for the cases that have been mentioned in the issue, where decoding integer-type attributes (skinning joints and normalized texture coordinates) returned all zeros.
The reason for the values being zero is:
SequentialIntegerAttributeDecodercalls itsgetValuesfunction at different placespreparePortableAttributeSo the
getValueswas called at one place, filled with the proper data (I guess), and later called again, causing these initial values to be lost.Running the test that was shown in the issue now reports at least "non-zero" values.
I also tried out this state in the context of jMonkeyEngine/jmonkeyengine#2591 . It does fix the case of the
unsigned shorttexture coordinates not being read. Maybe someone who knows what this code is about can check whether this "fix" makes sense, and whether something similar has to be done elsewhere. If this is the case, then I assume that ~"something like this" will be done in the .NET version, and then backported here.NOTE: This fix does not immediately fix the issue with the vertex skinning, but this might be an issue of how I'm using that library in jMonkeyEngine. So someone should (try to) confirm that the values that are provided by
openize-drako-javaare correct (I'll continue checking the jME side in the meantime)