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

Function AddAttribute

engine/graphics/src/test/test_graphics.cpp:767–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765};
766
767static inline void AddAttribute(dmGraphics::VertexAttributeInfos& infos,
768 float* values, uint32_t num_values,
769 dmGraphics::VertexAttribute::SemanticType semantic_type,
770 dmGraphics::VertexAttribute::DataType data_type,
771 dmGraphics::VertexAttribute::VectorType value_vector_type,
772 dmGraphics::VertexAttribute::VectorType vector_type)
773{
774 dmGraphics::VertexAttributeInfo* infos_array = (dmGraphics::VertexAttributeInfo*) infos.m_Infos;
775 infos_array[infos.m_NumInfos].m_SemanticType = semantic_type;
776 infos_array[infos.m_NumInfos].m_DataType = data_type;
777 infos_array[infos.m_NumInfos].m_VectorType = vector_type;
778 infos_array[infos.m_NumInfos].m_ValuePtr = (uint8_t*) values;
779 infos_array[infos.m_NumInfos].m_ValueVectorType = value_vector_type;
780 infos_array[infos.m_NumInfos].m_ElementCount = dmGraphics::VectorTypeToElementCount(vector_type);
781 infos.m_NumInfos++;
782}
783
784static inline void InitializeVertexAttributeInfos(dmGraphics::VertexAttributeInfos& infos, uint32_t num_streams)
785{

Callers 2

RunAllAttributeTestFunction · 0.85
TEST_FFunction · 0.85

Calls 1

VectorTypeToElementCountFunction · 0.85

Tested by

no test coverage detected