static assert( ElemInfo.fromType!vec2 == ElemInfo( 2, DataType.FLOAT ) ); static assert( ElemInfo.fromType!mat4 == ElemInfo( 16, DataType.FLOAT ) ); static assert( ElemInfo.fromType!(int[2]) == ElemInfo( 2, DataType.INT ) ); static assert( ElemInfo.fromType!float == ElemInfo( 1, DataType.FLOAT ) ); static class A{} static assert( !__traits(compiles, ElemInfo.fromType!A ) ); static assert( !__traits(compiles, ElemInfo.fromType!(int[]) ) ); static assert( !__traits(compiles, ElemInfo.fromType!dvec ) );
get ElemInfo from type
works with: * single numeric * static arrays * static vector * static matrix