code-google-com / opencollada

Automatically exported from code.google.com/p/opencollada
0 stars 0 forks source link

non-conformant <accessor> #157

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Import or export any data

What is the expected output? What do you see instead?
<accessor> where <param>'s are of type float. I see float4x4

What version of the product are you using? On what operating system?
r827 built on Windows 7

-------

OpenCOLLADA seems to be using types for <param> that are not allowed according 
specs. See 
http://www.khronos.org/collada/public-mailing-list/archives/1101/msg00008.html 
for more information on the nature of the issue.

Original issue reported on code.google.com by nathan.letwory on 3 Feb 2011 at 12:15

GoogleCodeExporter commented 9 years ago
Actually, the type in the param is intended as pass through to the application. 
It is not supposed to affect what data actually gets flushed out of the source.
The only thing that is supposed to affect that is the sequence of named and 
unnamed params. These according to the spec are supposed to dictate how the 
source gets flushed. It appears OpenCOLLADA does not flush its sources 
according to spec.

Details on the accessor:

The number and order of <param> elements define the output of the <accessor> 
element. Parameters 
are bound to values in the order in which both are specified. No reordering of 
the data can occur. A 
<param> element without a name attribute indicates that the value is not part 
of the output, so the element 
is unbound.
The stride attribute must have a value equal to or greater than the number of 
<param> elements. If 
there are fewer <param> elements than indicated by the stride value, the 
unbound array data source 
values are skipped.

Additional information is in one of the examples where it says:

To properly read a source through an <accessor>, the program has to consider 
the data expected by a 
particular semantic and compare it to stride, offset, and the number of params 
with nonnull names to 
decide how many values to read. Then, when reading, it has to skip over the 
data that corresponds to 
<param>s with no name. 

Original comment by mikkels...@gmail.com on 3 Feb 2011 at 8:16