Jump to content
  • Advertisement
Sign in to follow this  

Direct3d and gdi alignment

This topic is 4950 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 am somewhat new to directx(version 9) programming... I've done some but one thing is truely puzzling me. I am writing a simple app to demonstrate positions of things (for my own benefit is why), and I am unable to get the gdi and directx coordinates to match. I tried the -0.5f adjustment for re-aligning my image but it is not working. Here is what I do, I fill up a vertex buffer (just one quad) with 4 transformed vertcies, and I keep this same rectangle for the gdi to draw as well. Unfortunately the GDI and the rectangle rendered are offset in the y-direction. I suppose it would help to note this is all 2-d work, no 3-d yet. The x-coordinates match up nicely, however the y-coodrinates do not. The top of my gdi rectangle (denoted by -'s) and the top of the directx rendered object (denoted by x's) you would see this at the top of the window.. xxxxxxxxxxxxx ------------- but near the bottom of the screen it becomes exaggerated... xxxxxxxxxxxxx ------------- such as that, i want them to be aligned like this... -x-x-x-x-x-x- i.e. the same but, I cannot seem to find anything that helps, (been searching for at least a week on this, perhaps I am using the wrong search terms, but I see nothing around on google, here or any other place...) Thanks in advance, any information regarding alignment would be awesome!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!