• Advertisement
Sign in to follow this  

Getting the absolute mouse position with SlimDX

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

Advertisement
Quote:
specifically for solutions using SlimDX

Could you please explain why? I don't really understand the idea behind this..

Share this post


Link to post
Share on other sites
Quote:
Original post by snake5
Quote:
specifically for solutions using SlimDX

Could you please explain why? I don't really understand the idea behind this..

It's for a graphics library using SlimDX.

Share this post


Link to post
Share on other sites
Quote:
Original post by Narf the Mouse
It's for a graphics library using SlimDX.
So? SlimDX is built on top of the Windows OS, there's no reason not to use the Windows OS to get the cursor position. The cursor position has nothing to do with graphics.

Share this post


Link to post
Share on other sites
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.

Share this post


Link to post
Share on other sites
Quote:
Original post by jtagge75
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.

Gee, maybe it's the Mouse class in the SlimDX library. Having a Mouse class is generally a sign of Mouse-related data.

Now go dogpile on someone else.

Share this post


Link to post
Share on other sites
Quote:
Original post by Narf the Mouse
Quote:
Original post by jtagge75
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.

Gee, maybe it's the Mouse class in the SlimDX library. Having a Mouse class is generally a sign of Mouse-related data.

Now go dogpile on someone else.


Gee, if you'd actually done your research you'd realize that the mouse related functionality in SlimDX is simply a wrapper for DirectInput, and in DirectInput there is no way to deduce the absolute mouse position because mouse data is all relative to its last position. There isn't even an actual Mouse class in SlimDX. It's a generic Device class that accepts a MouseState struct. If the SlimDX group were for some reason to implement this, it would no doubt simply reference Cursor.Position internally, thus be completely redundant.

Does it bug you that much that you have to get all snooty to us because you have to use Cursor.Position instead of a property that should not even really be inside the MouseState struct?

If you're writing anything using the .NET framework, you should feel no worries using a property from a critical component of the .NET framework. That's what it's there for.

I apologize if I sound irate, but there's really no reason for this to be an issue.

[Edited by - Flimflam on September 25, 2009 12:16:43 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Narf the Mouse
Quote:
Original post by jtagge75
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.

Gee, maybe it's the Mouse class in the SlimDX library. Having a Mouse class is generally a sign of Mouse-related data.

Now go dogpile on someone else.
SlimDX is open source. If you don't like the way they've implemented certain features, I'm sure they'd appreciate patches.

Share this post


Link to post
Share on other sites

You can set the AxisMode in Properties:

_mouse.Properties.AxisMode = DeviceAxisMode.Absolute;

 

 

Share this post


Link to post
Share on other sites

 
SlimDX is open source. If you don't like the way they've implemented certain features, I'm sure they'd appreciate patches.

To be fair, SlimDX wouldn't accept such a patch since it would add functionality that isn't in the API it wraps.

Share this post


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

  • Advertisement