Added mouse movement and click support

This commit is contained in:
trotFunky 2019-10-14 21:48:49 +02:00
parent d343fdceec
commit 5e89dea0cf
3 changed files with 101 additions and 3 deletions

View file

@ -13,7 +13,11 @@ static Texture raptor_texture;
void manage_inputs()
{
if (KeyStateManager::is_key_pressed(' '))
if (KeyStateManager::is_mouse_button_pressed(GLUT_LEFT_BUTTON))
{
glClearColor(0,0,0.5,1);
}
else if (KeyStateManager::is_key_pressed(' '))
{
glClearColor(0.5,0,0,1);
}
@ -46,7 +50,7 @@ void display()
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(7.5, 7.5, 7.5,
gluLookAt(10, 7.5, 10,
0, 0, 1,
0, 1, 0);