Jump to content
  • Advertisement

Archived

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

Metus

Please Help Me....

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

Im learning to program Direct3D using D3DX, and I''ve initialized it and rendered a texture, but I''m having a problem: How do I convert screen-coords to Mousecoords? I''ve tried DirectInput with this code: while(true) { //Check for input lpDIMouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID) &DIMouseState); lpDIKeyboard->GetDeviceState(256, (LPVOID) &DIKey); //Get Mouse Coords MouseX += DIMouseState.lX; MouseY += DIMouseState.lY; if(MouseX >= 640) MouseX = 639; if(MouseX < 0) MouseX = 0; if(MouseY >= 480) MouseY = 479; if(MouseY < 0) MouseY = 0; Thanx in advance Metus, from the badlands of Sweden

Share this post


Link to post
Share on other sites
Advertisement
hi , check out this tutorial:
http://www.tasteofhoney.freeserve.co.uk/objectpicking.html

hope its help


Posted By Xeno.
Kobe Bryant - "Just believe in yourself"

Visit my web site : VSoft

Share this post


Link to post
Share on other sites
I can''t see anything wrong with your code.

But that''s not why I replied, I replied because I would like to ask a favour of you. The next time you write a post in the forum, please put an informative subject line on it. "Please help me..." doesn''t count as informative. I want to see a subject line related to your question and/or statement.

- WitchLord

Share this post


Link to post
Share on other sites
You go Mr.Moderator

Metus, if you are working in full screen then you don't have to do that. If you're working with a window which is smaller than your compy's resolution, there's an API called ScreenToClient()

..-=ViKtOr=-..

Edited by - Gladiator on June 26, 2000 4:40:14 PM

Share this post


Link to post
Share on other sites

  • 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!