示例#1
0
void DirectxFunctions::RenderDirectX()
{
	DirectX.Device->BeginScene();
	if (GetForegroundWindow() == Target.Window)
	{
		mMenuManager.Render();

		if (crosshair == true)
		{
			float centerx = Overlay.Width / 2, centery = Overlay.Height / 2;
			Drawing::Line(centerx - 3, centery, centerx - 10, centery, Color::Red);
			Drawing::Line(centerx + 3, centery, centerx + 10, centery, Color::Red);
			Drawing::Line(centerx, centery - 3, centerx, centery - 10, Color::Red);
			Drawing::Line(centerx, centery + 3, centerx, centery + 10, Color::Red);
		}

		if (trigger == true)
		{
			Yarin(&lPlayer, &InCH);
		}
		
	
	}


	DirectX.Device->EndScene();
	DirectX.Device->PresentEx(0, 0, 0, 0, 0);
	DirectX.Device->Clear(0, 0, D3DCLEAR_TARGET, 0, 1.0f, 0);
}