Quote:Original post by AndyTX
I think you're missing the point - Promit is correct: none of that has anything to do with how graphics hardware works.
I think you both are missing the point.
While the hardware does not take preference to 'coordinate system', it does take preference in regards to algorithm implimentation.
The choice of coordinate system is infact a choice from the subset of the permutation of all coordinate related algorithms. These algorithms range from the simplest (perhaps projection) to the most complex (perhaps piecewise subdivision of polygon soup) ..
The permutation of an algorithm which takes 3 inputs:
f(x,y,z)
f(x,z,y)
f(y,x,z)
f(y,z,x)
f(z,x,y)
f(z,y,x)
In cases where only one or a few of these is optimal due to hardware issues (I've shown a case where this is true), it behooves a project designer to maintain coherence by making a top level choice which lends itself naturally to favor the optimal permutation(s).
In effect, the hardware has influenced the choice of coordinate system... the same hardware that 'doesnt care' about coordinate systems.
Quote:Original post by AndyTX
Regarding your multidimensional array example: memory layout is completely independent of your coordinate system selection.
....snip...
They're really two totally separate choices.
This isnt quite right. Making it independed is a design choice. It can be depended or independed. You can choose to make them a seperate issue, or not.
If you are designing a library, making them a seperate choice has increased the complexity of the library internally or externally. Either the library needs to be told by the caller which swizzle will be optimal, or the caller needs to be told by the library which swizzle is optimal.
If you can make a coordinate system choice which avoids swizzles entirely while maintaining optimality in your library, why would you not?