• Advertisement

Archived

This topic is now archived and is closed to further replies.

can it be on purpose

This topic is 5150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ugh, first i am sure i am not the first to rant on this, but i am bored and felt like ranting... can it be accidental that direct3d uses row major order and left handed coordinate system and opengl uses column major order and right handed coordinate system? Is MS *trying* to make life difficult for people? I don''t do much direct3d coding, or any at all really, but am curious: Does this type of phenonema exist throughout all aspects of Direct3d? (the exact opposite of how opengl does it that is)... Well actually i think i thought of another example, opengl image format is bottom to top, i dont know this as fact, but i would wager directx is top to bottom. and they probably even want image data is BGRA instead of rgba... ugh.

Share this post


Link to post
Share on other sites
Advertisement
Hm...I''m not sure if its on purpose...its just a matter of preference..sure...it may seem to some that it is caused on purpose, but I think not.

And its not as ridiculous as BGRA, its ARGB. . Its just a matter of preference..

and I find Direct3D''s coordinate system more natural..I don''t know..probably because I was "raised" with it .

Share this post


Link to post
Share on other sites
I doubt that MS did it on purpose to piss off OpenGL programmers; I''m sure they have a good reason. I always found the OGL way weird; I was always taught the MS way in school so it made more sense to me

Share this post


Link to post
Share on other sites
OpenGL might have been first, but its designers seem rather contrary people. Right handed coordinate systems are more natural (there is a right hand rule, no left hand rule). Also while putting an origin in the bottom left corner makes some sense ... actually scanning/storing an image bottom to top is a travesty (m$ was just as idiotic in the olden days though, that''s how BMPs are stored too).

Share this post


Link to post
Share on other sites
Hmm. I''m not sure whether to move this to DirectX, move it to OpenGL, or close it as a DirectX vs. OpenGL flamewar waiting to happen ^_^

Share this post


Link to post
Share on other sites
It''s not just OpenGL and DirectX. I''m convinced that if you work in this industry long enough you will come across every possible combination of handedness, row/column representation, and the direction the axis'' are pointed. It seems as though almost every single graphics program, API, engine, etc chooses a slightly different approach. And yes, it''s irritating

-John

Share this post


Link to post
Share on other sites
with luck it wont happen. and having the z axis finally pointing in a direction thats more intuitive to me was a plus for directx (the interfaces changing with every version wasnt). also i wouldnt say opengl is col major and d3d is row major... why? opengl is nothing, because its reducing its matrices to a float[16] array and thats excactly what d3d does, just that opengl doesnt come with a mathematicaly index-correct access operator. if you use .m[col][row] in d3d its just the same, maybe .m[vector][component] is more obvious.

also, it seems people coming from math or physics are used to negative z going "away" from them, so opengl is doing that too. if you dont like it, set this as projection:
PMtr[16]={1/xFac, 0, 0, 0,
0, 1/yFac, 0, 0,
0, 0, farp/(far-near), 1,
0, 0, far*near/(near-far), 0};

and in your modelview make sure you dont invert the z-axis.

so those two things really arent anything you couldnt change the way you prefer it and at least with dx9 they seem to have noticed how much easier it is if you can choose.

Share this post


Link to post
Share on other sites

  • Advertisement