Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Drawing point seems to lag behind...

$
0
0
I have this Direct2D framework set up, it render a constant 60FPS and this is my code in my draw call: mRenderTarger->Clear(D2D1::ColorF(0.41f, 0.41f, 0.41f, 1.0f)); GetCursorPos(&mMouse); ScreenToClient(mhWindow, &mMouse); D2D1_POINT_2F point2 = D2D1::Point2F(mMouse.x, mMouse.y); //wrapper function of the Direct2D FillEllipse function drawPoint(point2, 6.f, D2D1::ColorF(1.0f, 0.15f, 0.30f, 1.f)); Now even without moving the mouse too fase, the point drawn kind of lag behind a bit, and moving the mouse faster, the point is drawn as far as 5cm from my mouse cursor so the lag is visible. Any idea why this accurs and how to fix it?

Viewing all articles
Browse latest Browse all 17825

Trending Articles