| 466 | } |
| 467 | |
| 468 | static inline void SetUnpackAttributeDataDefault(const VertexAttributeInfo& info, UnpackAttributeData& src_data, const UnpackAttributeData& dst_data) |
| 469 | { |
| 470 | if (dst_data.m_IsMatrix) |
| 471 | { |
| 472 | src_data.m_ValuePtr = (const uint8_t*) g_SourceDataDefaultMatrix; |
| 473 | src_data.m_ElementCount = 16; |
| 474 | src_data.m_VectorType = VertexAttribute::VECTOR_TYPE_MAT4; |
| 475 | src_data.m_IsMatrix = true; |
| 476 | } |
| 477 | else |
| 478 | { |
| 479 | if (info.m_SemanticType == VertexAttribute::SEMANTIC_TYPE_COLOR) |
| 480 | { |
| 481 | src_data.m_ValuePtr = (const uint8_t*) g_SourceDataDefaultVector; |
| 482 | } |
| 483 | else if (SemanticTypeRequiresOneAsW(info.m_SemanticType)) |
| 484 | { |
| 485 | src_data.m_ValuePtr = (const uint8_t*) g_SourceDataDefaultVectorOneAsW; |
| 486 | } |
| 487 | else |
| 488 | { |
| 489 | src_data.m_ValuePtr = (const uint8_t*) g_SourceDataDefaultVectorEmpty; |
| 490 | } |
| 491 | src_data.m_ElementCount = 4; |
| 492 | src_data.m_VectorType = VertexAttribute::VECTOR_TYPE_VEC4; |
| 493 | src_data.m_IsMatrix = false; |
| 494 | } |
| 495 | src_data.m_DataType = VertexAttribute::TYPE_FLOAT; |
| 496 | } |
| 497 | |
| 498 | // Conversion rules: |
| 499 | // ----------------- |
no test coverage detected