I've never had any formal training, I was wondering if there is a better / more efficient way to define this shit. I feel like I'm currently doing stuff the cs graduate meme way.
C++
What the fuck is this? Make a matrix?
I have to break up the data otherwise stack overflow
fuck, instArraySize is actually 3538944 It's calculated normally and I botched them when I wrote it for the screen shot
Why are you Not simply increasing the stacksize? Put this shit in a 2D array
stack size is at 400000000. Also it makes it easier to break it all up for calculations on separate bits later on.
Perhaps this?
float* mesh = new float[78 * instArraySize];
And then access with:
mesh[(y * instArraySize) + x]
And when you're done with it, free the memory with:
delete[] mesh;
Is it okay to go 1gig for stack size if I want to 2d array this shit?
holy shit, how come this didn't stack overflow?
You shouldn't be allocating big stuff on the stack indeed. You could use malloc which is hidden under "new" in C++ or make it global like you do. I think you could make it a two dimensional array to make it look less like cs graduate meme.
float mesh[78][instArraySize];
The data was allocated on the heap, not on the stack.