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

Function VectorTypeToMatrixRowColCount

engine/graphics/src/graphics_vertices.cpp:180–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 }
179
180 static inline uint32_t VectorTypeToMatrixRowColCount(VertexAttribute::VectorType vector_type)
181 {
182 switch(vector_type)
183 {
184 case VertexAttribute::VECTOR_TYPE_MAT2: return 2;
185 case VertexAttribute::VECTOR_TYPE_MAT3: return 3;
186 case VertexAttribute::VECTOR_TYPE_MAT4: return 4;
187 default: break;
188 }
189 return 0;
190 }
191
192 // Supports writing a matrix to a matrix, regardless of size of src and dst.
193 static void WriteMatrixToMatrix(uint8_t* write_ptr, const UnpackAttributeData& src_data, const UnpackAttributeData& dst_data)

Callers 2

WriteMatrixToMatrixFunction · 0.85
WriteScalarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected