utDataAssign

untyped data assign

void
utDataAssign
pure
(
T...
)
(
,
void* buffer
,
in T vals
)
if (
is(typeof(flatData!real(vals)))
)
in { assert (buffer !is null); assert (elem.comp == flatData!real(vals).length); }

Examples

1 float[] buf = [ 1.1, 2.2, 3.3, 4.4, 5.5, 6.6 ];
2 
3 utDataAssign( ElemInfo( 3, DataType.FLOAT ), cast(void*)buf.ptr, vec3(8,9,10) );
4 
5 assert( eq( buf, [8,9,10,4.4,5.5,6.6] ) );

Meta