6 hours ago
So @Petr for me....(and i know im a very specific case!)
Id dim the array for a model, then load it...in the loading its vertex, normals and UV coordinates would be derived from the file and then based on the amount of each we then redim the arrays of said UDT and load the data...but i hope your planning to allow for arrays of UDTs inside UDTs right? This way a given face or edge or vertex can hold its required info (normals, connections, UV, etc...) and this way only require dimensioning once...
I used _mem for this and a counter, in my load sub id get the size from the file, create an array, load it and then dimension the mem block, copy the data to it and the renderering sub would use the counter to know how big an array to make (often based on verts per frame), get the data from the mem block and then render it...i.e constantly making and destroying arrays every loop for every model....i was amazed that it works so fast though! (Galleon did a good job here!) and it was my go to method for simulating arrays in UDT's. To ME Fixed sized arrays are pointless...(though i appreciate the dev work and look forward to seeing REDIM a a thing!)
John
Id dim the array for a model, then load it...in the loading its vertex, normals and UV coordinates would be derived from the file and then based on the amount of each we then redim the arrays of said UDT and load the data...but i hope your planning to allow for arrays of UDTs inside UDTs right? This way a given face or edge or vertex can hold its required info (normals, connections, UV, etc...) and this way only require dimensioning once...
I used _mem for this and a counter, in my load sub id get the size from the file, create an array, load it and then dimension the mem block, copy the data to it and the renderering sub would use the counter to know how big an array to make (often based on verts per frame), get the data from the mem block and then render it...i.e constantly making and destroying arrays every loop for every model....i was amazed that it works so fast though! (Galleon did a good job here!) and it was my go to method for simulating arrays in UDT's. To ME Fixed sized arrays are pointless...(though i appreciate the dev work and look forward to seeing REDIM a a thing!)
John


