• Advertisement

Archived

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

Direct3D Issue

This topic is 6447 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

I'm starting to get into the 3D scheme, I've built a software rendering engine, and am currently getting into hardware acceleration starting with Direct3D and probably moving to OpenGL. However, I have gotten Direct3D up and running using proper enumeration and such, yet I am having some coordinate system issues. I read some of the SDK Documentation and it told me that Direct3D was based on a left handed coordinate system (positive z-axis going into the screen I believe) along with a countclockwise culling system. All is good until I built a program to render a simple triangle, I pointed the camera down the positive z-axis and translated the triangle forward down the positive z-axis so it could seen. All is fine since it was drawn properly. However, the odd thing is that when I tried moving some of the points, it moved in the opposite direction along the x-axis. for instance, if i thought i was moving it 5 to the right, it would move 5 to the left. I thought for a quick second and knew that for this to happen it would mean my camera is pointing in the wrong direction and for that reason the x-axis has been switched. So I pointed the camera down the negative x-axis along with the translation and it worked fine, everything was moving correctly. So.... do I have my coordinate systems messed up and what I thought was a left handed system is really a right handed system? or is there something in Direct3D that tweaks the direction? Disregard the culling stuff, obviously I had to switch two vertices when I pointed the camera in the other direction. Also note that the up vector on the camera points in the positive y direction. This could also cause this effect since if Direct3D uses a positive y axis that points down, it could also cause the camera to flip the x-axis. However, I think DirectX has a y-axis that points up. - Tom Edited by - olp-fan on 8/27/00 3:08:59 AM Edited by - olp-fan on 8/27/00 3:11:57 AM

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement