- fbx: add binary reading draft. Started from scratch after my first attempt had design flaws. The binary reader now sits on the lexer stage (really) and generates a (fake) token sequence similar to the text lexer's output - this means most parsing code can go unaffected.

This commit is contained in:
Alexander Gessler
2012-08-09 02:08:12 +02:00
parent 3899fc5257
commit 24ce9495fd
8 changed files with 1738 additions and 1304 deletions

View File

@@ -152,7 +152,13 @@ void FBXImporter::InternReadFile( const std::string& pFile,
// syntax elements of FBX (brackets, commas, key:value mappings)
TokenList tokens;
try {
Tokenize(tokens,begin);
if (!strncmp(begin,"Kaydara FBX Binary",18)) {
TokenizeBinary(tokens,begin,contents.size());
}
else {
Tokenize(tokens,begin);
}
// use this information to construct a very rudimentary
// parse-tree representing the FBX scope structure