| 669 | } |
| 670 | |
| 671 | static inline uint32_t DataTypeToByteWidth(VertexAttribute::DataType data_type) |
| 672 | { |
| 673 | switch(data_type) |
| 674 | { |
| 675 | case dmGraphics::VertexAttribute::TYPE_BYTE: return 1; |
| 676 | case dmGraphics::VertexAttribute::TYPE_UNSIGNED_BYTE: return 1; |
| 677 | case dmGraphics::VertexAttribute::TYPE_SHORT: return 2; |
| 678 | case dmGraphics::VertexAttribute::TYPE_UNSIGNED_SHORT: return 2; |
| 679 | case dmGraphics::VertexAttribute::TYPE_INT: return 4; |
| 680 | case dmGraphics::VertexAttribute::TYPE_UNSIGNED_INT: return 4; |
| 681 | case dmGraphics::VertexAttribute::TYPE_FLOAT: return 4; |
| 682 | default: break; |
| 683 | } |
| 684 | return 0; |
| 685 | } |
| 686 | |
| 687 | // Test functions: |
| 688 | void* MapVertexBuffer(HContext context, HVertexBuffer buffer, BufferAccess access); |
no outgoing calls
no test coverage detected