Spec: Add some named constants

- Addresses a comment in KhronosGroup/glTF#1114
This commit is contained in:
Frank Galligan 2017-10-20 15:02:57 -07:00
parent f5e4c0a128
commit 24b91359da
3 changed files with 11 additions and 4 deletions

View File

@ -6,9 +6,9 @@
~~~~~ ~~~~~
void DecodeSymbols(num_symbols, num_components, out_values) { void DecodeSymbols(num_symbols, num_components, out_values) {
scheme UI8 scheme UI8
if (scheme == 0) { if (scheme == TAGGED_SYMBOLS) {
DecodeTaggedSymbols(num_symbols, num_components, out_values); DecodeTaggedSymbols(num_symbols, num_components, out_values);
} else if (scheme == 1) { } else if (scheme == RAW_SYMBOLS) {
DecodeRawSymbols(num_symbols, out_values); DecodeRawSymbols(num_symbols, out_values);
} }
} }

View File

@ -114,9 +114,9 @@ void DecodeSequentialCompressedIndices() {
~~~~~ ~~~~~
void DecodeSequentialConnectivityData() { void DecodeSequentialConnectivityData() {
ParseSequentialConnectivityData(); ParseSequentialConnectivityData();
if (connectivity_method == 0) { if (connectivity_method == SEQUENTIAL_COMPRESSED_INDICES) {
DecodeSequentialCompressedIndices(); DecodeSequentialCompressedIndices();
} else if (connectivity_method == 1) { } else if (connectivity_method == SEQUENTIAL_UNCOMPRESSED_INDICES) {
DecodeSequentialIndices(); DecodeSequentialIndices();
} }
} }

View File

@ -15,6 +15,10 @@
* 2: SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION * 2: SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION
* 3: SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS * 3: SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS
* Sequential indices encoding methods
* 0: SEQUENTIAL_COMPRESSED_INDICES
* 1: SEQUENTIAL_UNCOMPRESSED_INDICES
* Prediction encoding methods * Prediction encoding methods
* -2: PREDICTION_NONE * -2: PREDICTION_NONE
* 0: PREDICTION_DIFFERENCE * 0: PREDICTION_DIFFERENCE
@ -66,6 +70,9 @@
* 256: IO_BASE * 256: IO_BASE
* 4096: L_RANS_BASE * 4096: L_RANS_BASE
* Symbol encoding methods
* 0: TAGGED_SYMBOLS
* 1: RAW_SYMBOLS
### Variables ### Variables