コード例 #1
0
ファイル: main.cpp プロジェクト: henrikdahlberg/GPUPathTracer
void Update() {
	double currentTime = glfwGetTime();
	deltaTime = currentTime - lastTime;
	SetWindowTitle(window, deltaTime);
	ProcessKeyboardInput(deltaTime);
	if (bReset) {
		renderer->Reset(camera);
		bReset = false;
	}
	Display();
	lastTime = currentTime;
}
コード例 #2
0
ファイル: InputSystem.cpp プロジェクト: YoungBot/Engine
///------------------------------------------------------
///
///------------------------------------------------------
void InputSystem::Update()
{
	for(unsigned int i =0; i<NUMBER_OF_VIRTUAL_KEYS ; i++)
	{
		m_keyStates[i].m_wasJustReleased = false;
		m_keyStates[i].m_wasJustDown = false;
	}
	for (unsigned int i = 0; i < NUMBER_OF_MOUSE_KEYS; i++)
	{
		m_mouseStates[i].m_wasJustReleased = false;
		m_mouseStates[i].m_wasJustDown = false;
	}
	ProcessKeyboardInput();
	for(unsigned int i =0;i<3;i++)
	{
		ProcessControllerInput(m_xboxControllerStates[i]);
	}
	
}
コード例 #3
0
ファイル: InputSystem.cpp プロジェクト: tbgeorge/putty_engine
///---------------------------------------------------------------------------------
///
///---------------------------------------------------------------------------------
void InputSystem::Update()
{
    ResetMouseCursor();

	for( unsigned int keyIndex = 0; keyIndex < NUMBER_OF_VIRTUAL_KEYS; ++keyIndex )
		m_keyDownStates[ keyIndex ].m_wasJustReleased = false;

	for( int buttonIndex = 0; buttonIndex < XBOX_NUMBER_OF_BUTTONS; ++buttonIndex )
	{
		for( int controllerIndex = 0; controllerIndex < MAX_NUMBER_OF_XBOX_CONTROLLERS; ++controllerIndex )
			m_xboxContollerStates[ controllerIndex ].m_buttonDownStates[ buttonIndex ].m_wasJustReleased = false;
	}

    for (unsigned int buttonIndex = 0; buttonIndex < MAX_NUMBER_OF_MOUSE_BUTTONS; ++buttonIndex)
        m_mouseButtonStates[buttonIndex].m_wasJustReleased = false;

	ProcessKeyboardInput();
	ProcessXboxControllersInput();
}