MCPcopy Create free account
hub / github.com/defold/defold / GetGraphicsType

Function GetGraphicsType

engine/graphics/src/graphics.cpp:514–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512 }
513
514 dmGraphics::Type GetGraphicsType(dmGraphics::VertexAttribute::DataType data_type)
515 {
516 switch(data_type)
517 {
518 case dmGraphics::VertexAttribute::TYPE_BYTE: return dmGraphics::TYPE_BYTE;
519 case dmGraphics::VertexAttribute::TYPE_UNSIGNED_BYTE: return dmGraphics::TYPE_UNSIGNED_BYTE;
520 case dmGraphics::VertexAttribute::TYPE_SHORT: return dmGraphics::TYPE_SHORT;
521 case dmGraphics::VertexAttribute::TYPE_UNSIGNED_SHORT: return dmGraphics::TYPE_UNSIGNED_SHORT;
522 case dmGraphics::VertexAttribute::TYPE_INT: return dmGraphics::TYPE_INT;
523 case dmGraphics::VertexAttribute::TYPE_UNSIGNED_INT: return dmGraphics::TYPE_UNSIGNED_INT;
524 case dmGraphics::VertexAttribute::TYPE_FLOAT: return dmGraphics::TYPE_FLOAT;
525 default: assert(0 && "Unsupported dmGraphics::VertexAttribute::DataType");
526 }
527 return (dmGraphics::Type) -1;
528 }
529
530 Type ShaderDataTypeToGraphicsType(ShaderDesc::ShaderDataType shader_type)
531 {

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected