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

Function SetVertexAttributeInfoFromDDF

engine/render/src/render/material.cpp:217–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 static void SetVertexAttributeInfoFromDDF(dmGraphics::VertexAttributeInfo& info, Material* m, const dmGraphics::VertexAttribute& ddf_attribute, const MaterialAttribute& material_attribute)
218 {
219 info.m_NameHash = ddf_attribute.m_NameHash;
220 info.m_SemanticType = ddf_attribute.m_SemanticType;
221 info.m_DataType = ddf_attribute.m_DataType;
222 info.m_CoordinateSpace = ddf_attribute.m_CoordinateSpace;
223 info.m_VectorType = ddf_attribute.m_VectorType;
224 info.m_Normalize = ddf_attribute.m_Normalize;
225 info.m_StepFunction = m->m_InstancingSupported ? ddf_attribute.m_StepFunction : dmGraphics::VERTEX_STEP_FUNCTION_VERTEX;
226 info.m_ValueVectorType = ddf_attribute.m_VectorType;
227 info.m_ElementCount = dmGraphics::VectorTypeToElementCount(ddf_attribute.m_VectorType);
228 info.m_ValuePtr = &m->m_MaterialAttributeValues[material_attribute.m_ValueIndex];
229 }
230
231 static void UpdateVertexAttributeValuePointers(Material* m)
232 {

Callers 1

Calls 1

VectorTypeToElementCountFunction · 0.85

Tested by

no test coverage detected