Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use an explicit header size rather than an attribute offset
The total size of the header fields (minus the attributes) are declared up front at the start of the header. This will prevent future additions to the header from having to introduce their own "attribute_offset" field variations. This also rearranges the padding so that all header fields are strictly aligned according to their type, and the header field total is a multiple of 16. Fix #49
- Loading branch information
Showing
10 changed files
with
151 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
...m.smfj.specification/src/main/resources/com/io7m/smfj/specification/binary-smf-header.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[record SMFBv1_0Header | ||
([field schema SMFBv1SchemaID] | ||
([field fields_size [integer unsigned 32]] | ||
[field schema SMFBv1SchemaID] | ||
[padding-octets 4] | ||
[field vertex_count [integer unsigned 64]] | ||
[field triangle_count [integer unsigned 64]] | ||
[field triangle_index_size_bits [integer unsigned 32]] | ||
[field attribute_count [integer unsigned 32]] | ||
[field attribute_offset [integer unsigned 32]] | ||
[field coordinate_system SMFBv1CoordinateSystems] | ||
[padding-octets 2])] | ||
[padding-octets 14])] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.