Jump to content

  • Log In with Google      Sign In   
  • Create Account


Codeka

Member Since 19 Oct 2008
Offline Last Active Jul 20 2014 08:53 PM

#4531949 Getting the absolute mouse position with SlimDX

Posted by Codeka on 24 September 2009 - 06:28 PM

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.


#4375840 Interaction of Clear(), BeginScene(), EndScene(), Present()

Posted by Codeka on 05 January 2009 - 12:13 PM

You're always working on the "backbuffer" (I put it in quotes, because it a bit more complicated but conceptually you're always working on the backbuffer).

So Clear clears the back buffer. BeginScene tells the driver "I'm about to start with the Draw calls". Each time you call Draw (or any DirectX call, really), the DirectX runtime queues that call to the driver - the driver runs in a separate threads and pulls work off the queue as fast as it can. EndScene will wait for that queue to empty so that when you call Present to swap the back buffer to the front, it knows that the scene has finished.

The whole Clear/BeginScene/EndScene/Present basically allow the DirectX runtime to run asynchronously to the rest of your application.

Note that it's a bit more complicated than that in practise (mainly because the queue can actually last a couple of frames) but that's conceptually how it works.

Also, in DirectX 10, the BeginScene and EndScene calls are gone.


PARTNERS