Quote:Original post by TutenStain
I need a way to store a lots of numbers for a .3ds model loader.
Why do you need to store "lots" of numbers? What does "lots" mean? Exactly 5,000? Why 5,000, and not any other number?
Quote:Original post by TutenStain
I need a way to store a lots of numbers for a .3ds model loader.
Quote:Original post by Zahlman
I think people have been missing the context here.Quote:Original post by TutenStain
I need a way to store a lots of numbers for a .3ds model loader.
Why do you need to store "lots" of numbers? What does "lots" mean? Exactly 5,000? Why 5,000, and not any other number?
Quote:
It really depends on the model itself. Im just coding the loader. I dont want to put a limitation on the 3d artist. If an object requires 10000000 (unlikely) vertecies I want to be able to support it. Even thought it might run a slow.
Quote:Original post by jpetrieQuote:
It really depends on the model itself. Im just coding the loader. I dont want to put a limitation on the 3d artist. If an object requires 10000000 (unlikely) vertecies I want to be able to support it. Even thought it might run a slow.
Why aren't you using std::vector, then?
Quote:Original post by TutenStainQuote:Original post by jpetrieQuote:
It really depends on the model itself. Im just coding the loader. I dont want to put a limitation on the 3d artist. If an object requires 10000000 (unlikely) vertecies I want to be able to support it. Even thought it might run a slow.
Why aren't you using std::vector, then?
Isn't it slower?
Quote:Original post by jpetrieQuote:
It really depends on the model itself. Im just coding the loader. I dont want to put a limitation on the 3d artist. If an object requires 10000000 (unlikely) vertecies I want to be able to support it. Even thought it might run a slow.
Why aren't you using std::vector, then?
Quote:Original post by TutenStainI'd still suggest using std::vector. If you resize() it first, it's exactly as fast as an array, and has the added benefits of automatically cleaning up the memory when it goes out of scope, does bounds checking every time you access an element, and is easily copyable without having to implement it all yourself.
I got it working with the new command. Might not be perfect but works for my purposes. Thanks for the suggestions.
int n = 10; //N=Number of objects.
float (*x)[100000] = new float[n][100000];