[Pas2js] Multi dimensional static array to dynamic array?

Ryan Joseph ryan at thealchemistguild.com
Sun May 13 07:57:29 CEST 2018


I have the array:

array[0..3, 0..3] of GLfloat

which I need to pass to “array of GLfloat” but I can’t seem to typecast. What’s recommended here? Again we have weirdness going from Pascal to JS where I would pass this as a pointer but in JS they should be the same type and typecast should be ok.

TJSFloat32List = array of GLfloat;
data: array[0..3, 0..3] of GLfloat;
list: TJSFloat32List;

list := TJSFloat32List(data); // no go

Regards,
	Ryan Joseph



More information about the Pas2js mailing list